Skip to main content

Hello everybody,

I have a problem with the format of the result of the TableAdder custom transformer. I don't know how to handle the input values to get a good-looking result if the content fills multiple pdf pages. If the content fits on just one page everything is okay and it looks good but when I create more than one page FME tries to display the whole content on one page (screenshot).

Tried to experiment with the Max X value and the Max Y value but nothing helps. Also tried to divide the content by counting the rows of the table and change the pdf_page_number attribute on each 50th row but the display is still zoomed out and just leaves the rest of the page empty as you see in the screenshot. Hope you can help me with that.

With kindest regards,

Felix

What if you group your data into 50-row chunks prior to using the PDFPageFormatter, e.g. with a ModuloCounter?


What if you group your data into 50-row chunks prior to using the PDFPageFormatter, e.g. with a ModuloCounter?

I did something like that with the counter that counts every dataset before using the TableAdder. With the AttributeCreator I use after the PDFPageFormatter I set the new value of the pdf_page_number with the expression ´@round(@add(@div(@Value(_anzahl),50),0.5))´ so every page just contains 50 datasets. In the attribute table you can see that that works. The first 50 datasets have the value 1 at the pdf_page_number attribute, the datasets between the count 51 and 100 have the value 2 and so on.. Also in the pdf file you can see that there are 50 datasets displayed on every page. Everything fine but they are zoomed out as if I want to display all the data on one page, maybe because of the bounding box of the whole data (?)

 


I did something like that with the counter that counts every dataset before using the TableAdder. With the AttributeCreator I use after the PDFPageFormatter I set the new value of the pdf_page_number with the expression ´@round(@add(@div(@Value(_anzahl),50),0.5))´ so every page just contains 50 datasets. In the attribute table you can see that that works. The first 50 datasets have the value 1 at the pdf_page_number attribute, the datasets between the count 51 and 100 have the value 2 and so on.. Also in the pdf file you can see that there are 50 datasets displayed on every page. Everything fine but they are zoomed out as if I want to display all the data on one page, maybe because of the bounding box of the whole data (?)

 

Yes, I'm pretty sure the bounding boxes come into play as well. I'd try offsetting each chunk so they all occupy the same bounding box. That's what gets fitted into the area specified in the PDFPageFormatter.

 

 


Reply