Hi,
I am using PDFFileStamp for adding header, footer and page numbers. My pdf file is 5000 pages big and is of 500 MB size. I am adding different page footer on every page and by doing so the final document generation takes 5 minutes. If I remove the code for footer it will get generated in 50 seconds. here is a small code snippet how I am using the PDFFileStamp.
PdfFileStamp pfe = new PdfFileStamp(pdfDocument);
pfe.setPageNumberRotation(1);
pfe.addHeader(new FormattedText("Header"), 10);
for(int i=1; i<pdfDocument.getPages().size; i++)
{
pfe.addFooter(new FormattedText("Footer for page " + i), 10)
}
pfe.addPageNumber(new FormattedText(" Page #"));
If in the above code I comment the footer code the file gets generated with no performance issue and it takes 50 seconds to generate. Can you please let me know if I am doing something wrong.
Thanks
Rajeev Mathur
I am using PDFFileStamp for adding header, footer and page numbers. My pdf file is 5000 pages big and is of 500 MB size. I am adding different page footer on every page and by doing so the final document generation takes 5 minutes. If I remove the code for footer it will get generated in 50 seconds. here is a small code snippet how I am using the PDFFileStamp.
PdfFileStamp pfe = new PdfFileStamp(pdfDocument);
pfe.setPageNumberRotation(1);
pfe.addHeader(new FormattedText("Header"), 10);
for(int i=1; i<pdfDocument.getPages().size; i++)
{
pfe.addFooter(new FormattedText("Footer for page " + i), 10)
}
pfe.addPageNumber(new FormattedText(" Page #"));
If in the above code I comment the footer code the file gets generated with no performance issue and it takes 50 seconds to generate. Can you please let me know if I am doing something wrong.
Thanks
Rajeev Mathur