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