Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Jun 29, 2016 11:56 am

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,

mickshepherd
 
Posts: 1
Joined: Mon Mar 10, 2014 4:51 pm

Thu Jun 30, 2016 2:33 am

Dear mickshepherd,

Thanks for your inquiry.
I have tested your scenario, but I didn't reproduce your issue. Firstly, I suggest you use the latest Spire.PDF V3.7.106, after trying this version, if your issue still exists, please provide us your sample document here, or you can send it to us (support@e-iceblue.com) via email.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.PDF

cron