i have encountered a problem maximum page size allowed in iTextsharp, so when i try to generate a document with size superior to 14 400 , i get an message error the.page.size.must.be.smaller.than.14400.by.14400.its.1.by.2, i tried to play with userunits like described here , but i have not found a solution.
i generate the PDF by merging file in one page using AddTemplate(), i think to scale the pdf dimensions by 1/4 for eg, and set userunits to 4, but i think that i should scale the imported pages too , any help in this way because i don’t know how to scale imported pages, i not sure if this the right solution.
PdfImportedPage imp1 = wr.GetImportedPage(r1, 1);
wr.DirectContent.AddTemplate(imp1,(float)(x*cm),(float)(y*cm));
Any help please or any suggestion
As you make clear in your comment that your problem in testing your solution (
DirectContent.AddTemplateapplied to aPdfImportedPage) actually is that you don’t know how to scale imported page, here a pointer to an example that shows how to do right that.Have a look at the sample NUpTool.cs translated from the matching Java sample NUpTool from chapter 6 of iText in Action — 2nd Edition. The variable
factorhere describes the scaling factor.