I have a workbench which writes individual objects to multi page PDF. The page number is defined using 'count' and assigning a 'group' which is then used after the PDF PageFormatter to specify 'pdf_page_number. However I now need to have 2 objects per page. Can anyone advise how I can group these automatically into groups of 2 to write per page?
Introduce a second number to order the page and us a Sorter before writing to the pdf. Or maybe I understand your question wrong. Do you mean you want to print two pdfpageformatters-pages on one page?
Introduce a second number to order the page and us a Sorter before writing to the pdf. Or maybe I understand your question wrong. Do you mean you want to print two pdfpageformatters-pages on one page?
@stalknecht Thanks - No you are correct, only one PDFPagFormatter. The problem is how do I auto number them? I have map and text elements which as they pass through the count are allocated numbers. They are in order so that the relevant text goes with each map.
So you have this sort of scenario
ObjectCountPage one Map0Page one Text1Page two Map2Page two Text3And want to get to this?
ObjectGroupPage one Map0Page one Text0Page two Map2Page two Text2If this is the case there are a couple of different options you could try, depending on how confident you are of everything coming through in the correct order.
Simplest would probably be an attribute creator to create the pdf_page_number with a conditional statement that says if number is even set the pdf_page_number to the count, if the number is odd set the pdf_page_number to the count minus 1
So you have this sort of scenario
ObjectCountPage one Map0Page one Text1Page two Map2Page two Text3And want to get to this?
ObjectGroupPage one Map0Page one Text0Page two Map2Page two Text2If this is the case there are a couple of different options you could try, depending on how confident you are of everything coming through in the correct order.
Simplest would probably be an attribute creator to create the pdf_page_number with a conditional statement that says if number is even set the pdf_page_number to the count, if the number is odd set the pdf_page_number to the count minus 1
my maps and text are counted
separately -
CountMap 11Map 22Map 33Map 44Map 1 text1Map 2 text2Map 3 text3Map 4 text4So I want to get to -
GroupMap 11Map 21Map 32Map 42Map 1 text1Map 2 text1Map 3 text2Map 4 text2
my maps and text are counted
separately -
CountMap 11Map 22Map 33Map 44Map 1 text1Map 2 text2Map 3 text3Map 4 text4So I want to get to -
GroupMap 11Map 21Map 32Map 42Map 1 text1Map 2 text1Map 3 text2Map 4 text2
Vote for this idea https://knowledge.safe.com/idea/76412/add-group-by-support-in-pdfpageformatter.html
So you have this sort of scenario
ObjectCountPage one Map0Page one Text1Page two Map2Page two Text3And want to get to this?
ObjectGroupPage one Map0Page one Text0Page two Map2Page two Text2If this is the case there are a couple of different options you could try, depending on how confident you are of everything coming through in the correct order.
Simplest would probably be an attribute creator to create the pdf_page_number with a conditional statement that says if number is even set the pdf_page_number to the count, if the number is odd set the pdf_page_number to the count minus 1
@fmod(@Value(attribute),2)
@fmod(@Value(attribute),2)
yes just found the expression but don't think 'even/odd' solution will work??
1= same12-113-1?24-2?25-2?36-3?3
yes just found the expression but don't think 'even/odd' solution will work??
1= same12-113-1?24-2?25-2?36-3?3
'if number is even set the pdf_page_number to the count, if the number is odd set the pdf_page_number to the count minus 1' won't work.
Though as I said above, the pdf page formatter doesn't have a group by so depending on the data you have to display, there are additional things you will need to consider to get this working, i.e. correctly setting pdf_world_rectangle attributes
Solved this by using Grouper (sampling rate 2) then later using Duplicate Filter to pass Group 1s and 2s to desired port on PDFPageFormatter. :-)