We are trying to merge multiple pages into a large document, this varies between 20 pages and up to 100. The pages can be simple text pages and also pages filled with images.
The job that is generating problems has 96 single pages (each 2mb ~ 4mb) with a combined total of 275mb. When we are merging the pages, the memory usage goes up to 800+mb. When we are lucky the proces can finish. If not the proces throws an OutOfMemoryException (and sometimes i get a NullReferenceException in Insert/Append. And i even got a 0-byte file without exception on my workstation while testing)
When we are trying to do it in batches of 10 pages, we have no trouble. But when we want to merge the batches to get the document we want, it's still a no go :-(
We tried inserting the MemoryManagement class posted in this forum, but this is after pdf.kit is finished. We are having trouble while pdf.kit is running.
We notices this with Pdf.Kit 3.5.0, we updated to 4.0.0 and still have the same issue.
Is there a workaround that allows us to finish this task with Pdf.Kit? Currently we can use aspose on our smaller products, but not on the bigger documents. Currently this is getting a serious problem for us.
ps: it is possible to flush data to disk while inserting/appending to reduce the memory used during this process?