Workflow optimization adding backgrounds to large pdfs

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v7)  /  Re: Workflow optimization adding backgrounds to large pdfs

DynamicPDF CoreSuite for .NET (v7) Forum

We are working to better optimize our production of generating large files of transactional information. We presently create pdfs in batches of approx. 1,000 pages and merge all the batches together at the end, but wonder if this is really the optimal approach.

Would it be more efficient to add the backgrounds to the larger pdf of say 100,000 pages using maybe 15 different, variable, backgrounds? The caveat to running in this way is we would need something in the pdf: invisible text, page marker, maybe even using metadata to instruct the application what background to apply to which page.

We interested in final pdf’s optimization and file size moreover than production time, though both are relevant.

Do you have any recommendations?

Posted by a ceTe Software moderator

In general it would be more efficient to add backgrounds at the time of PDF generation because you can take into account the following performance considerations while writing code that generates your initial PDFs. For example, if the backgrounds have a common set of images or text you could create appropriate page elements once and reuse them as suggested in the performance considerations topic. You would be able to apply these optimizations across the board if you generate the final PDF with all pages in a single run (instead of merging multiple 1000 page PDFs). Although, make sure you have enough memory to handle such large PDFs as DynamicPDF hold all resources in memory during PDF generation.

After the PDF is generated, applying the same background to all pages in the PDF is not tricky but it seems like you need to apply different backgrounds for different page and it may get tricky as you mentioned.

In v7 we don’t have any features that you would allow you to optimize the final PDFs but starting from v8 we introduced DocumentOptimization class that can combine duplicate images if any present in the PDF.

ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 4:58 PM.