Hello!
Currently we’re facing some problems in our application when we try to generate a thumbnail from some specific PDF files.
We’re currently have Aspose 7.1.0.0 version and when we got this problem we decided to test the newer version (17.3.0.0) to see if the problem was solved.
It’s important that not all files are giving us problem, just some files that we’re not being able to generate a PNG image to use as thumbnail.
I downloaded the newest version available but the problem persisted.
With that in mind, we’d like to know if there’s a way to make this work with the newest version so we can update our version, which at the moment is not an option since the problem still happens in the newest version available.
I attached the file that the causes the problem (we can reproduce the error with all files that are the same type that I’m attaching)
Also, here’s the code that we’re using to convert the PDF to a PNG image:
-------------------------------------------
String documentPath = “~mypath\documentoTesteThumbnail.pdf”;
String thumbnailPath = “~mypath\doc_thumbnail.png”;
Document pdfDocument = new Document(documentPath);
using (FileStream imageStream = new FileStream(thumbnailPath, FileMode.Create))
{
//create Resolution object
Resolution resolution = new Resolution(150);
//create PNG device with specified attributes (Width, Height, Resolution)
PngDevice pngDevice = new PngDevice(110, 160, resolution);
//convert a particular page and save the image to stream
pngDevice.Process(pdfDocument.Pages[1], imageStream);
//close stream
imageStream.Close();
}
If there’s anything else that I can provide to help to identify this case or I wasn’t clear enough, please let me know.
At,