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

Free Support Forum - aspose.com

Converting PDF to TIF - Out of memory

When converting large (ie 25 pages or more etc) PDF files, memory usage on the server explodes and we get an out of memory error. For example, when running the conversion process in a web application, the IIS worker process will start with a memory usage of 78,364K, and when converting a large PDF file with 25 pages, the memory usage expands to 799,228K which seems extreme. On our production server, we will get a 'out of memory exception' when this happens.

The VB.NET code we are using looks as follows:

Dim document As New Aspose.Pdf.Document(pdfSourcefilePath)

'create Resolution object
Dim resolution As New Aspose.Pdf.Devices.Resolution(300)

'create TiffSettings object
Dim tiffSettings As New Aspose.Pdf.Devices.TiffSettings()
tiffSettings.Depth = Aspose.Pdf.Devices.ColorDepth.Format1bpp
tiffSettings.Compression = Aspose.Pdf.Devices.CompressionType.CCITT4
tiffSettings.Shape = Devices.ShapeType.Portait
tiffSettings.SkipBlankPages = False

        'create TIFF device
        <br><br>Dim tiffDevice As New Aspose.Pdf.Devices.TiffDevice(resolution, tiffSettings)

        <br>'convert a particular page and save the image to stream
        <br><br>tiffDevice.Process(document, destinationFolder & "\" & fileName)            


Hi Mark,

Thank you for using our products and sharing source code with us.

Can you please share template PDF document you are using or create a sample application to show the issue. This will help us to figure out the issue and reply back to you soon.

We apologize for your inconvenience.

Thanks & Regards,

Attached is a large PDF file that we are trying to convert to TIF that consumes a lot of memory.

Hi Mark,

Thank you for sharing the template document.

I have tested your scenario with your template file and sample code using Aspose.Pdf v6.6 and it works fine (attached is the resultant file for your reference). Kindly check it with latest version, you can download from here. However, I would suggest kindly visit Performance Improvement during PDF to TIFF Conversion for more details.

Please feel free to contact support in case you required any further assistance.

Thanks & Regards,