Skip to main content
Solved

pdf report for each feature with its attributes as a table

  • February 28, 2019
  • 3 replies
  • 97 views

vki
Contributor
Forum|alt.badge.img+7
  • Contributor

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

 

Best answer by arnovananrooij

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.

View original
Did this help you find an answer to your question?

3 replies

arnovananrooij
Contributor
Forum|alt.badge.img+5
  • Contributor
  • Best Answer
  • March 1, 2019

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.


vki
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 4, 2019

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


arnovananrooij
Contributor
Forum|alt.badge.img+5
vki wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings