I have a pdf file attached that just hangs on the following line:
while (convPDF.HasNextImage())
After about 5 minutes I get the error message:
Error: Wrong conversion, please check your pdf.
Is there anyway to check the file for a proper format before trying to get the next image? Here’s the whole snippet:
convPDF = new PdfConverter();
convPDF.BindPdf(sPath);
convPDF.DoConvert();
MemoryStream ms = new MemoryStream();
convPDF.StartPage = intPage;
convPDF.EndPage = intPage;
while (convPDF.HasNextImage())
{
convPDF.GetNextImage(ms, System.Drawing.Imaging.ImageFormat.Bmp);
bmp = (Bitmap)System.Drawing.Image.FromStream(ms);
}
THANKS!
This message was posted using Page2Forum (attachment) from Aspose.Words for .NET and Java - Documentation