Saving a page from a pdf to an image
PDFsharp is a .NET library for creating and modifying PDF documents.
Brought to you by:
pdfsharp,
stefan_lange
I am looking at the sample code and trying to create some code that takes the pages of a pdf and saves them off to jpg images. I can open a PdfDocument document. I can loop through the .Pages to get a PdfPage object. I can even create an XGraphics object from the page. I am at a loss however of how to take any one of the PdfPage or XGraphics objects, and save them off to an image file. there must be some way to create a new Bitmap object, and transer the pdf information into the Bitmap object, then save the bitmap object as jpg. Thoughts?
I'm trying to do the same thing. I "thought" I might be able to do something with the page.Contents.CreateSingleContent stream, but no luck, it generates some sort of compiler error.
Anyone know how to do this?
PDFsharp cannot render PDF. Try Ghostscript for creating images from PDF (http://www.ghostscript.com/awki)