Solved

pdf report for each feature with its attributes as a table

  • 28 February 2019
  • 3 replies
  • 11 views

Badge +6
  • Contributor
  • 53 replies

I've been struggling with this for quite some time now, but without success...

I need to write a pdf-File for each feature of my data, containing only a table with it's attributes (Attribute Name: Attribute Value), no geometry.

As suggested here https://knowledge.safe.com/questions/74002/attribute-data-to-pdf.html, I first tried to write excel-Files with this tables, using a featurewriter / fanout (https://knowledge.safe.com/questions/46550/dataset-fanout-for-featurewriter.html)

But my problem is, how can I write a table with the names of the attributes on the same lines as their values ?

(When I'll have succeeded in writing the excel files, then I'll try to read them with a featureReader and write pdf-Files, using the TableAdder...)

Thanks in advance, Vera

 

icon

Best answer by arnovananrooij 1 March 2019, 10:58

View original

3 replies

Badge +4

Hi @vki,

you could use the ColumnToRow transformer available from the FME hub. Unfortunately I just noticed it does not work for columnames with spaces. You could overcome this to first replace the spaces with an underscore using the BulkAttributeRenamer and after the ColumnToRow transformer a StringReplacer to replace te underscores back to spaces.

Badge +6

Thanks a lot, that's what I was looking for. With the ColumnToRow transformer I managed to rearrange the attributes for my report.

(As for the pdf-report: I tried to create a table in a pdf with the TableAdder, and it's quite hard..., but then I found a much better transformer: the HTMLReportGenerator. In this post:

 

https://knowledge.safe.com/questions/84748/conditional-html-report-formatting-and-table-conte.html I found some useful informations. My report is not pdf now, but HTML, but that's ok too...)

Thanks, Vera

Badge +4

Thanks a lot, that's what I was looking for. With the ColumnToRow transformer I managed to rearrange the attributes for my report.

(As for the pdf-report: I tried to create a table in a pdf with the TableAdder, and it's quite hard..., but then I found a much better transformer: the HTMLReportGenerator. In this post:

 

https://knowledge.safe.com/questions/84748/conditional-html-report-formatting-and-table-conte.html I found some useful informations. My report is not pdf now, but HTML, but that's ok too...)

Thanks, Vera

Oké, great. Nice to hear you managed to achieve what you want.

Reply