Convert pdf page into an image(bmp)

0
Is there a way to convert a pdf document page into a bitmap? I can see that I can create an image for a page but this excludes and text that should also be included. Many Thanks
 
asked 12/19/2018 8:04:37 PM
add a comment

3 Answers

0
I'm using version 7.0.40.226. Flatten makes the conversion even worse, some of the originals end up with 0 pages. I can send over an example of the original pdf and the converted image if you give me an email for you to try?
 
answered 1/7/2019 2:24:53 PM
add a comment
0
I have tried this and I only get the image section of the document. All text fields are missing. I can send you an example if you like but every document I have tried has failed other than image only pdfs. Thanks
 
answered 12/24/2018 10:27:51 AM
  What version did you use? If you see no form fields, you may want to `Flattern` the form before converting to image. e.g. `pdfImportedDocument.Form.Flatten = true` sysadmin 12/24/2018 10:44:52 AM
  I'm using version 7.0.40.226. Flatten makes the conversion even worse, some of the originals end up with 0 pages. I can send over an example of the original pdf and the converted image if you give me an email for you to try? Solvitt 1/3/2019 10:05:20 AM
add a comment
0
You can export a page to image by using the `ExportAsImage` method of the class `PdfImportedDocument`. Here is the example: string path="../../Output/Page_"; using (var loadedDocument = new PdfImportedDocument(@"../../Data/PDF_File.pdf")) { for (int i = 0; i < loadedDocument.Pages.Count; i ) { path = i.ToString(); Image img = loadedDocument.ExportAsImage(i); img.Save(path ".png"); img.Dispose(); img = null; } } MessageBox.Show("Pages exported!");
 
answered 12/21/2018 5:54:59 PM
  I have tried this and I only get the image section of the document. All text fields are missing. I can send you an example if you like but every document I have tried has failed other than image only pdfs. Thanks Solvitt 12/24/2018 10:28:18 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged pdf pdf-viewer or ask your own question.