We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Large files & streams


We are getting occasional “OutOfMemoryException” when using Pages.Add(PageCollection) to copy page content from one file to another - is there a preferred way of copying page content (into a new Document object) that correctly utilises ‘streams’ and doesn’t require holding both documents in memory?

I cannot find much documentation that covers working with large files.



Thanks for contacting support.

I have tested the scenario in our environment by concatenating some of my sample PDF document(s) with Aspose.Pdf for .NET 17.8 and was unable to notice any exception. Furthermore, I would also add that it is recommended to use x64 mode of debugging while working with large files and streams. This way your program have access to full installed memory in your system.

You may please try using x64 mode of debugging and in case if you still experience any issue, please provide some details about your working environment (i.e OS Version, Application Type, Target Framework, etc) along with details about PDF documents (i.e FileSize, Number of Pages, Number of Documents), so that we can test the scenario in our environment and address it accordingly.