Skip to main content
Solved

How to write attributes into PDF report ?

  • November 22, 2023
  • 4 replies
  • 335 views

vimva679
Supporter
Forum|alt.badge.img+9

I want to create a PDF report like this , where i have HEADER and the value below

 

image 

In this yellow boxes 'PDMS' column could go in this attribute values image 

this is my FME workflow to insert HEADER but , the values / attributes are coming from Excel output , so i need to insert them in this boxes like sum / average , total count etc.

 

image

Best answer by redgeographics

I tried but not successful , am attaching SAMPLE file with workbench, please if you could help

You need to create a point for each feature before adding the text, that can be in an imaginary coordinate system. FME will then place that text on that location in the box you set up in the PDFPageFormatter.

 

Keep in mind that all the input you send to that box in the PDFPageFormatter gets scaled to the extent of the box, so choose your coordinates wisely.

 

Styling can be done with the PDFStyler, but keep in mind the PDF specs do not allow for more than one style per text object (so you can't make one word in a line of text bold, you'll have to split it up and position the texts precisely)

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.

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+61

So similar to the header texts you've already added you need to add the values, per feature, below them (in the correct positions). Basically it works the same way.


vimva679
Supporter
Forum|alt.badge.img+9
  • Author
  • Supporter
  • November 23, 2023

So similar to the header texts you've already added you need to add the values, per feature, below them (in the correct positions). Basically it works the same way.

I tried but not successful , am attaching SAMPLE file with workbench, please if you could help


vimva679
Supporter
Forum|alt.badge.img+9
  • Author
  • Supporter
  • November 23, 2023

Also it would be nice to know how to highlight / bold the title and have background colour


redgeographics
Celebrity
Forum|alt.badge.img+61
  • Celebrity
  • Best Answer
  • November 23, 2023

I tried but not successful , am attaching SAMPLE file with workbench, please if you could help

You need to create a point for each feature before adding the text, that can be in an imaginary coordinate system. FME will then place that text on that location in the box you set up in the PDFPageFormatter.

 

Keep in mind that all the input you send to that box in the PDFPageFormatter gets scaled to the extent of the box, so choose your coordinates wisely.

 

Styling can be done with the PDFStyler, but keep in mind the PDF specs do not allow for more than one style per text object (so you can't make one word in a line of text bold, you'll have to split it up and position the texts precisely)