Skip to main content
Solved

pdf report for each feature with its attributes as a table

  • February 28, 2019
  • 3 replies
  • 146 views

vki
Contributor
Forum|alt.badge.img+7
  • Contributor
  • 64 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

 

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

arnovananrooij
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 73 replies
  • 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
  • 64 replies
  • 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
  • Contributor
  • 73 replies
  • 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

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