Convert PDF to JPG, split PDF document to individual jpg images. Supports all versions of PDF 1.0 - 1.7.

PDF to jpeg conversion is a tool to quickly take your vector-based file format (PDF document) and rasterize it to a pixel-based format (raster image file).

XsPDF .NET PDF to Jpg converting control supports converting PDF document to a range of high-quality separate jpg image files in .NET development using C# programming language. The advantage PDF to jpeg library is taking low memory and thread safe. Owing to jpg image's small-size feature, it's counted as a more suitable choice for publishing in web services than PDF document file.

In this article, it shows how to change PDF file to a group of jpeg images and pictures in C# class application. Developers can customize the converted image size and DPI resolution. Thumbnails can be created from PDF pages. Password protected PDF document can be converted and changed to Jpeg image files.

Guide in Visual Studio
  1. Download the trial package and uncompress it.
  2. Open Visual Studio, create new C# Console Application or ASP.NET web programming.
  3. Copy "XsPDF.dll", "x86" and "x64" folders from download package to your .NET project Bin folder.
  4. In the Solution Explorer right-click on "References" and select "Add Reference". Next add references to the "System.Drawing" and "XsPDF.dll".
How to Convert PDF to JPG in C#.NET class?

// Create a PDF converter instance by loading a local file 
PdfImageConverter pdfConverter = new PdfImageConverter("sample.pdf");

// Set the dpi, the output image will be rendered in such resolution
pdfConverter.DPI = 96;

// the output image will be rendered to grayscale image or not
pdfConverter.GrayscaleOutput = false;

for (int i = 0; i < pdfConverter.PageCount; i++)
    // Convert each pdf page to jpeg image with original page size
    //Image pageImage = pdfConverter.PageToImage(i);
    // Convert pdf to jpg in customized image size
    Image pageImage = pdfConverter.PageToImage(i, 500, 800);

    // Save converted image to jpeg format
    pageImage.Save("Page " + i + ".jpg", ImageFormat.Jpeg);

More PDF tutorial