Out of memory exception in Aspose.PDF v8.3.0

We run a multithreaded application that uses Aspose to convert PDF documents to TIF documents. We run up to 15 simultaneous conversions at the same time. We do nothing with the documents except load them and save them.

We occasionally get out of memory errors in Aspose.PDF calls to System.Drawing at the stack trace listed below. The machines on which this work is run have 4GB of RAM but hosts several different applications. Are there any tricks or optimization techniques I should be using in Aspose to try to prevent these errors?

Thanks.

Jim McFadden/Unum

+ + +

Aspose.Common.ConvertPDFToTIF: EXCEPTION (OutOfMemoryException) - Out of memory.; at System.Drawing.Graphics.CheckErrorStatus(Int32 status) at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height) at ..?() at Aspose.Pdf.Devices.TiffDevice.Process(Document document, Int32 fromPage, Int32 toPage, Stream output) at Aspose.Pdf.Devices.DocumentDevice.Process(Document document, String outputFileName) at MyNamespace.AsposeCommon.ConvertPDFToTIF(PageOrientation orientation, String SourceFile, String OutputFile, String Password, Int32 DPI, BlahConfiguration Configuration, Hashtable items, String RequestID) Source - D:\Test\Cache\f47cabba-3291-4672-9a24-bd11a849d2be Output - D:\Test\Cache\2013082818561710100E.tmp ; Source - System.Drawing

Hi Jim,


Thanks for using our products.

The problem during conversion might be occurring due to the input PDF file being used. Can you please try converting individual PDF files and figure out which document is causing this problem. The problem might be related to the structure and complexity of input PDF file. We are sorry for this inconvenience.

Furthermore, please note that Aspose.Pdf for .NET does not support the feature to load single PDF file in multiple threads.