Taking too long for saving document as stream

I’m generating the pdf with tables and it will create around 200-300pages.
So while saving the document as stream it taking too long and not completing but its working for around 10 pages
Do we need to do any optimization for long time?
I’m using below steps.

  1. Creating document
  2. Adding header and footer
  3. Inserting the table
  4. Document.ProcessPragraphs()
    5.Save document as stream. Document.save(stream).

This topic has been moved to the related forum: Taking too long for saving document as stream - Free Support Forum - aspose.com