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.Then 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.