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

Free Support Forum - aspose.com

Output PDF Pages as PNG on Azure

Hi


We run an Azure Web Job to convert documents to PDF and output PNG images of the pages from the resultant PDF, for the most part this works fine however now and then we get pages with issues but the issue only presents itself when running in Azure. Locally the output works fine. This is the error we get:

System.ArgumentException: Corrupt content. at .a.•(Š , †a , Boolean ) at .a.Process( document, page, – device, & context) at ‚.™.Ÿž(& context) at Aspose.Pdf.Devices.PngDevice.Process(Page page, Stream output)

I’m aware there are issues with converters that use the GDI+ libraries when running in Azure, are there any workarounds to avoid the issue?

Thanks

Simon

Hi Simon,


Thanks for using our API’s.

As per my understanding from above statement, the problem is occurring when using the API in Azure environment. Furthermore, can you please confirm if the problem is occurring for certain PDF files or its appearing for all the documents. We are sorry for this inconvenience.

Hi


Apologies for the false alarm, we were running an old version (9) of the PDF libraries and with a recent upgrade to Total we had access to the newer PDF library and I found the document.Repair function, not previously available to us, which solved the issue as there was obviously a problem with the PDF even though it opened in Acrobat I suspect Acrobat was doing a silent repair.

Thanks

Simon

Hi Simon,


Thanks for the acknowledgement.

We are glad to hear that your problem is resolved in latest release. Please continue using our API’s and in the event of any further query, please feel free to contact.