Skip to content
Loading
  • +1
    Hi,
    Check this link:

    Convert PDF Page to Image in C#

    http://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Convert-PDF-Page-to-Image-with-C-code.html
    +1
  • Salman Beg
    +1
    Hi.
    Please check this link,
     
    https://www.c-sharpcorner.com/blogs/convert-pdf-file-into-image-filepngjpgjpeg-using-ghostscript
     
    Thanks. 
    +1
  • +1
    If you're still looking for a solution, the LEADTOOLS SDK can be used to convert each page in an input PDF to an individual JPEG output file. This can be done by loading the PDF, iterating over each page, and individually saving these pages out.
     
    1. using (RasterCodecs codecs = new RasterCodecs())   
    2. {​​  
    3.   ​ codecs.Options.Load.AllPages = true;  
    4.    RasterImage image = codecs.Load(pathToInputFile);  
    5.   
    6.    for (int i = 1; i < image.PageCount; i++)   
    7.    {​  
    8.       ​​​​​string outputFile = Path.Combine(pathToOutputFolder, string.Format("page{​​​​​​​0}​​​​​​​.jpg", i));  
    9.       image.Page = i; codecs.Save(image, outputFile, RasterImageFormat.Jpeg, 0);  
    10.    }  
    11. ​​​​}​​​​​​​  
     
     
    This is all that's necessary to break the input document into separate pages. You can request the evaluatoin toolkit from the official site.
     
    https://www.leadtools.com
    +1