Menu

Saving a page from a pdf to an image

scotthakel
2006-02-09
2013-04-23
  • scotthakel

    scotthakel - 2006-02-09

    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?

     
    • Richard M

      Richard M - 2006-07-02

      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 Team

      PDFsharp Team - 2006-09-27

      PDFsharp cannot render PDF. Try Ghostscript for creating images from PDF (http://www.ghostscript.com/awki)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.