Guide for C#
Core Document Formats
Additional Features
PDF to Image

C# Imaging - Convert PDF to Image in C#.NET

How to Convert PDF Document to Image Using C#.NET Image Converter

Visual C#
Home > .NET Imaging SDK > C# > Convert PDF to Image

"This online guide content is Out Dated!
    Please get the latest XDoc.PDF C# Developer Guide here.

RasterEdge C#.NET PDF to image converter control add-on is written in 100% managed C# code and counted as a robust .NET solution for high-fidelity PDF to image conversion. Using this C#.NET PDF to image converting library, developers can easily convert PDF document to a more editable & searchable image file (like PNG, JPEG, BMP, GIF or TIFF) by Visual C# programming code.
Related .net document control helps: image viewer: ASP.NET Image Viewer Control(MVC & WebForms): view, annotate, redact, convert image files in html, JQuery dicom document viewer: ASP.NET Dicom Document Viewer Control: view, annotate dicom imaging files online in ASP.NET document viewer: EdgeDoc:ASP.NET Document Viewer C# Control: Open, view, annotate, redact, convert documents online in C#, VB.NET, AS... edit pdf text: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET mvc pdf editor: ASP.NET MVC PDF Viewer & Editor: view, annotate, redact, edit PDF document in C# ASP.NET MVC text file viewer: ASP.NET Text file viewer in MVC, WebForms: Open, view, annotate, convert txt files in C# ASP.NET pdf editor: EdgePDF: ASP.NET PDF Editor Web Control: Online view, annotate, redact, edit, process, convert PDF documents
Here we offer you a quick navigation for this online tutorial page on how to convert PDF document into image file using C# programming code.
  • Integration guide for RasterEdge C#.NET PDF to image converter add-on
  • C#.NET method to convert source PDF document to desired image file
  • C# sample code for multi-page PDF document to image conversion in .NET
  • C#.NET PDF to image converting control FAQs
This RasterEdge C#.NET PDF to image converter add-on is a .NET solution that aims to convert document to image file. But if you want to convert image to other file types, like converting image to byte array using C# code and converting image to stream by C# programming language, RasterEdge C#.NET image conversion SDK can also meet your needs.
Convert PDF to Image in C#.NET
This section mainly talks about the installation issue of this RasterEdge C#.NET PDF to image conversion control. But before reading the integrating guidance below, please check whether you have installed the Visual Studio 2005 or above versions and .NET Framework 2.0 or greater versions.
  1. After downloading the trial package of RasterEdge DocImage SDK for .NET (a comprehensive .NET imaging SDK that contains this C#.NET PDF to image converting add-on), please run this application file "RasterEdge.Imaging License Manager.exe" to get the evaluation license key;
  2. Integrate following dlls into your C#.NET class application by adding reference directly;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.PDF.dll
  3. Copy above mentioned trial license key (a text file called "RasterEdgeLicense.txt") to your C# project bin folder;
  4. The installation of RasterEdge C#.NET PDF to image converter add-on is completed now.
C# Method for PDF to Image Conversion
To complete the conversion between PDF document and image file, RasterEdge C#.NET converter SDK will use following methods and two steps will be involved. One is to open source PDF document file and the other is to save edited PDF page to desired image file.
/// Following APIs are designed to help users render PDF page to image collection
BasePage PDFDocument.GetPage(int pageIdx);
BaseImage PDFPage.toImage();
BaseImage PDFPage.toImage(int height, int width);

/// Use image saving API below to convert PDF to other image formats
void REFile.SaveImageFile(REImage image, String filePath);
Demo C# Code to Convert PDF to Image
Here we provide a C# code snippet which can help developers convert a PDF document (drawn from local disk) to image files (tiff, png, jpeg, gif, bmp, svg and so on). What should be noted here is that the target PDF document can be also loaded from other sources, like web-based server. If needed, you can go to this VB.NET PDF to image converting tutorial page to see the VB.NET programming example for PDF to image conversion.
/// <summary>
/// To view, edit or save images of a pdf file, first generate REImage from a particular page of the document.
/// </summary>
/// <param name="doc"></param>
/// <returns></returns>
public List<REImage> GetReImageForPDFDocument(PDFDocument doc)
List<REImage> imageList = new List<REImage>();
for (int i = 0; i < doc.GetPageCount(); i++)
PDFPage tmpPage = (PDFPage)doc.GetPage(i);

REImage tmpImage = (REImage)tmpPage.ToImage();


return imageList;

/// <summary>
/// You can transform REImage to TIFF image with following sample code
/// <param name="doc"></param>
public void ConvertPDFToTIFF(PDFDocument doc)
List<REImage> imageList = GetReImageForPDFDocument(doc);
int imgCount = 1;

foreach (REImage img in imageList)
REFile.SaveImageFile(img, @"C:" + imgCount + ".tif", new TIFEncoder());
C# PDF to Image Converting Control FAQs
Q 1: Can I convert multiple PDF documents to image files at once using RasterEdge C#.NET PDF to image conversion control?
A 1: No, this C#.NET PDF to image converter control can only convert one PDF document at a time.

Q 2: I want to convert a multi-page PDF document to one image file using RasterEdge C#.NET PDF to image converter add-on. Is it possible?
A 2: Sorry, the current version of RasterEdge C#.NET PDF to image converter add-on can only support converting each PDF document page to separate image file.

Q 3: I want to convert a group of PDF document pages to separate image files using C#.NET code. Does RasterEdge PDF to image converter control allow developers to select a page range for PDF to image conversion?
A 3: Sorry, currently, our C#.NET PDF to image converting library can only allow programmers to select one PDF page or select its all pages for image conversion.

Recommend this to Google+ is professional provider of ASP.NET MVC Document Viewer, ASP.NET PDF Viewer, MVC PDF Viewer document, content and imaging solutions, available for ASP.NET AJAX, Silverlight, Windows Forms as well as WPF. We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and components for capturing, viewing, processing, converting, compressing and stroing images, documents and more.

©2000-2017 Raster