IRONSOFTWAREHOME
Convert a PDF to Images
import {PdfDocument} from "@ironsoftware/ironpdf";

(async () => {
    // Import existing PDF document
const pdf = await PdfDocument.fromFile("example.pdf");

    // Extract all pages to a folder as image files
    await pdf.rasterizeToImageFiles("image/image.png");

    // Extract all pages as image buffers
    const imageBuffers = pdf.rasterizeToImageBuffers();
})();
npm i @ironsoftware/ironpdf
Convert a PDF to Images

Convert a PDF to Images

Rasterizing a PDF to Images

Rasterizing a PDF to an image involves converting each page of the PDF document into a static image format, such as JPEG or PNG. This process is commonly used when you need to extract individual pages or images from a PDF for various purposes, like displaying them on a website or incorporating them into a different document.

PDF documents can be rasterized into images using IronPDF's PDF to Image Converter. You also have the option to specify the image type for the output images. Each output image will be named with "_pageNumber" at the end to indicate its corresponding page number in the original PDF.

Below is an example of how you can use IronPdf to convert a PDF to images using C#:

Key Points

  • IronPDF is used to handle the conversion of PDF documents to images.
  • The FromFile method loads the PDF document into an IronPdf.PdfDocument object.
  • ImageSaveOptions allows customization of the image format and resolution.
  • RasterizeToImageFiles method exports each page of the PDF to separate image files, naming them according to their page number.
  • The images are saved to a specified output directory.

Ensure you have the IronPdf library installed in your project to use its functionalities. You can install it via NuGet Package Manager:

This snippet provides a basic framework for using IronPdf to convert a PDF into a series of images, which can be further customized to suit specific needs.

Learn to Convert PDF to Images with Python
View on GitHub

Ready to Get Started?

Version:2026.8just released

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

OR
bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried Iron Suite
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required
Node.js Module Download for PDF
Install with npm

Version: 2026.8

  1. Download and install Node.js 12+.
  2. Execute the above command in the terminal.

Licenses from $999