Skip to main content
Solved

How to write attributes into PDF report ?

  • November 22, 2023
  • 4 replies
  • 262 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

vimva679 wrote:

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)

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

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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
redgeographics wrote:

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+49
  • Celebrity
  • Best Answer
  • November 23, 2023
vimva679 wrote:

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)


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