pdfbox Nup pdf document

Viewed 27

I need to 2-up (A4 to A3 every two A4 pages) a pdf doc. I found this and it works (I use the pdfbox answer) but only for the first new page on the newly created doc. The problem is that when use a loop to add more new pages then it throws an error "Optional group (layer) already exists: left" in the layerUtility.appendFormAsLayer(outPdfPage, formPdf1, afLeft, "left");

UPDATE: I replaced "left" with "left" + i to have left1,left2 etc but the result is a not well responsive pdf file after 100-200 pages. It is very difficult to navigate pages.

0 Answers
Related