Converting PDF to TIFF fails in Azure- but works locally

We’re using Aspose.Pdf to convert PDFs to TIFFs. The following code works when running in debug mode locally (in Cassini), but when we deploy to Azure, the resulting file can’t be opened as a TIFF.

var pdfDocument = new Aspose.Pdf.Document(stream);
var settings = new TiffSettings { Compression = CompressionType.LZW };
DocumentDevice device = new TiffDevice(new Resolution(200), settings);
device.Process(pdfDocument, newStream);

When we open the file, the Windows photo viewer says it "can’t open this picture because the file appears to be damaged, corrupted, or is too large."

The broken TIFF files are a bit bigger than the working files (with the exact same input) – broken files are 625K, working files are 531K.

Any ideas? Thanks!

Hi Tim,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the details.

As you have mentioned that your issue is related to Azure deployment and on your local machine you are able to generate the files properly. This means that issue is specific to Azure and we will need to check the issue under same environment. We will need some time to check your issue and will get back to you with our findings via this forum thread.

Sorry for the inconvenience,