Skip to main content

I already had a look at the following link and it helped me in the right direction, however I am still stuck. I use values from the boundingbox transformer for determining whether I need a portrait or a landscape layout. See image below how I have defined it. In case the length of the xdifference is bigger than the ydifference, then I would go for a landscape layout.afbeeldingThen I tried several ways to define the size:

1) defining the values shown above in the attribute pdf_page_size in the attributecreator transformer. 

2) Create a user parameter from above and use it in the pdf writer under parameters "Page Size (points)"

3 Using a TestFilter in combination with two PDFPageFormattters don't work I get the following error 

 

PDFPageFormatter (PDFLayoutFactory): Invalid page object '<at>Value<openparen>Grootte<closeparen><space>=<space>Portrait' parameters 'MINX;-260;MINY;1152;WIDTH;255;HEIGHT;39;FIXED_ASPECT;Yes;CLIPPING_ENABLED;No'.  All point positions must be a positive number

 

However until now the above methods didn't work unfortunately. Does anyone might know a thing I might have overlooked.

Are you using a PDFPageFormatter? That's another place where the page size can be specified and I think it gives you a bit more control over how your data ends up on the page. You'll have to use two, one for portrait and one for landscape orientation though, as its parameters can't be fed through attributes or user parameters.

 

Alternatively, you can use the pdf_page_height and pdf_page_width format attributes.

 

 


Are you trying to run it with your data off the page, that produces that sort of error?

 

image


Are you using a PDFPageFormatter? That's another place where the page size can be specified and I think it gives you a bit more control over how your data ends up on the page. You'll have to use two, one for portrait and one for landscape orientation though, as its parameters can't be fed through attributes or user parameters.

 

Alternatively, you can use the pdf_page_height and pdf_page_width format attributes. 

 

 

Hello @Hans van der Maarel​ , thanks for suggestion. I actually I already tried to use the PDFPageFormatter and unfortunately I got the following error.

PDFPageFormatter (PDFLayoutFactory): Invalid page object 'Output' parameters 'MINX;-93;MINY;803;WIDTH;88;HEIGHT;39;FIXED_ASPECT;Yes;CLIPPING_ENABLED;No'.  All point positions must be a positive number

I see that the minx is negative and that's now allowed (therefore the error above), however based on the boundsextractor (coordinates)I have the following values. So I am wondering how the values above for the pdfpageformatter are calcualted and how I can circumvent this error.

afbeelding


Are you trying to run it with your data off the page, that produces that sort of error?

 

image

Yes, I think you probably found the cause of my error. 🙂 When I looked into and I got the following values that are red and are negative. Do I just manually change the values and in case yes what are good values to choose?

afbeelding


Yes, I think you probably found the cause of my error. 🙂 When I looked into and I got the following values that are red and are negative. Do I just manually change the values and in case yes what are good values to choose?

afbeelding

You can either manually change the values, or just drag it onto the page layout


Yes, I think you probably found the cause of my error. 🙂 When I looked into and I got the following values that are red and are negative. Do I just manually change the values and in case yes what are good values to choose?

afbeelding

Thanks, I dragged the output into the page en resized the output box to fit the whole page and then the output was what I needed! afbeelding


Reply