Convert a PDF to Images

Use IronPDF to convert a PDF to images in your preferred file type, image dimensions, and DPI quality.

To convert a PDF document to images, call IronPDF's RasterizeToImageFiles method on a PdfDocument object. A PDF document can be loaded using the PdfDocument.FromFile method or one of the available PDF generation methods.

RasterizeToImageFiles renders each page of the as a rasterized image. The first argument specifies the naming pattern to use for each image. Optional arguments can be used to customize the quality and dimensions for each image. Another one causes the method to convert selected pages from the PDF into images.

Line 24 of the featured code example demonstrates the ToBitMap method. Call this method on any PdfDocument object to quickly convert the PDF into AnyBitmap objects that can be saved to files or manipulated as needed.

How to Convert a PDF to Images in C#

  1. Install the PDF to image C# library
  2. Import existing PDF file with FromFile method
  3. Convert PDF to image using RasterizeToImageFiles method
  4. Specify save directory and image size
  5. Check the output images