Convert PDF document to a range of high-quality separated jpg image files in ASP.NET programming, split PDF to small size jpeg images in web servers.

PDF to jpeg conversion is a tool to transform PDF format (vector-based file) to jpeg/jpg image format (raster pixel-based format).

Support converting each PDF page to a single jpg image, the DPI of converted jpg image can be customized, so you can render the jpg in your best fit resolution. If you don't set the DPI property, the output image will be rendered as original page size.

In this online guide, it shows how to change PDF file to a individue jpeg images and pictures in aspx.cs class. The PDF converting web application can be deployed in your windows servers without any difficulty.

Guide in Visual Studio
  1. Download the trial package and uncompress it.
  2. Open Visual Studio, create new 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 ASP.NET class?

// Initialize a PDF converter by loading a file from server 
PdfImageConverter pdfConverter = new PdfImageConverter("sample.pdf");

// Customized the dpi of rendered image
pdfConverter.DPI = 96;

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

    // Save jpeg file in your server side
    pageImage.Save("Page " + i + ".jpg", ImageFormat.Jpeg);