Rank: Newbie Groups: Member
Joined: 1/25/2012 Posts: 3
|
I'm trying to do generate a single large pdf file that contains hundreds of pages (up to 700 pages).
Each page will be one of 4 template pdf files.
I am planning to load each of the 4 pdf files into a PdfDocument and then use the Clone command.
Is it better to make 700 calls to PdfDocument.Merge or make a single call to PdfDocument.Merge with an array of PdfDocuments?
I also need to write text strings and images onto these pages that vary per page. Is it more efficient/faster to write text and images when the document is small (1 page at a time) or is it better to write onto the 700 page document.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi,
You will probably want to split the files into multiple chunks (for example, one chapter a chunk), convert each chunk separately and then merge them. Converting all 700 pages in a single run is the most efficient method but it is also the slowest because it only uses one CPU, and it can run out memory if you have a lot of images. Split them into different chunks will allow you to convert each chunk in a different thread thus speed things up. However it is not necessary to split them into single pages. Merge is relatively efficient but 700 merges will still have an impact on the performance.
Thanks!
|