I am using the following code to convert PDF documents to JPEG images:
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(filePath);
Image jpg = doc.SaveAsImage(0);
jpg.Save(dest, System.Drawing.Imaging.ImageFormat.Jpeg);
It generally works very well, but for some pdf documents, it creates a blank image. I noticed it on a PDF document that contains a print screen of our computer interface form. It is mostly gray textboxes, etc. It creates the image correctly when scanned to PDF using grayscale but just creates a blank jpeg when the pdf is scanned with normal black and white settings. The pdf looks the same either way. We scan in large batches so it's not possible to change the scan setting for individual documents. Has anyone seen this problem before?
Thanks,