Incrementally Saving PDF

Aspose PDF .NET 10.5


When building a large Document, is incremental saving a good idea? How can I clear up some memory during the build process? I have a lot of nested tables to get the design I need. Is there something I should be doing to render these tables more efficiently? Overall, I’m having some memory problems in IIS and on my local machine running some test PDF creations. Any tips would be very welcome. Thanks.

Hi Dirk,


Thanks for using our API’s and sorry for the delayed response.

Before analyzing / testing the scenario, I cannot share any generic solution regarding performance improvements. However while creating PDF file, you may consider using FreeMemory(); method of Document class to free the memory being occupied by unused objects of API.

Besides this, you may consider PDF file in smaller chunks i.e. smaller PDF files and call Dispose(…) method over Document object to free the memory occupied by individual Document instance and then concatenate smaller PDF files to generate a single large resultant document.

In case you still do not get optimized performance, can you please share some solution/sample project, so that we can test the scenario in our environment.