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

Free Support Forum - aspose.com

Preview is not working on this file

Hi,

We are using this code to generate previews for pdf files of scanned documents, for this file it generates a blank image :

Stream pdfFileStream = null;

var viewer = new PdfViewer();
try
{
pdfFileStream = File.OpenRead(inputPdfFile);
viewer.OpenPdfFile(pdfFileStream);
if (viewer.PageCount ==0)
throw new Exception(String.Format("PDF file '{0}' has no images inside.", inputPdfFile));
viewer.DecodePage(0).Save(outputImageFile, ImageFormat.Jpeg);
}
finally
{
viewer.ClosePdfFile();
if (pdfFileStream != null)
pdfFileStream.Close();
}

Can you please diagnostic why ?

Regards,

Dimitri

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

Thank you for sharing the template file.

I tested your scenario with the latest version of Aspose.Pdf for .NET v6.6 and I am able to generate the image file successfully(resultant file attached). Please download and try the latest version and let us know if it works fine for you.

Thank You & Best Regards,

it works, thank you

Regards,

Dimitri