In this article, we will introduce you how to use pqScan PDF to Image Converting Library SDK in C# programming application. Please bear in mind that we only give simple samples for performing basic PDF document to GIF image conversion. If you need to use all converting functions, you may see all supported properties and APIs from .NET PDF to GIF converting overview. Do contact us if you have any request, we are pleased to help.
- Open Visual Studio to create a C# console project;
- Obtain pqScan .NET PDF to Image SDK trial via download button above;
- Unzip to find a suitable PQScan.PDFToImage.dll for your application;
- Add required DLL library to C# project as reference;
- Use free sample code below for rapid PDF file to GIF image conversion;
PDF to GIF Conversion - How to in C#
The following C# code gives you an example of rendering and converting PDF to gif image using pqScan PDFToImage SDK.
static void Main(string args)
// Create an instance of PQScan.PDFToImage.PDFDocument object.
PDFDocument pdfDoc = new PDFDocument();
// Load a PDF document.
// Get its page count.
int count = pdfDoc.PageCount;
for (int i = 0; i < count; i++)
// Change PDF page to image.
Bitmap gifImage = pdfDoc.ToImage(i);
// Save image as gif image format.
gifImage.Save("output" + i + ".gif", ImageFormat.Gif);
In the following C# programming tutorial, you will see how to perform the feature of turning PDF file to Gif image with a target size in C# .NET application.
static void Main(string args)
// Make a new instance of PQScan.PDFToImage.PDFDocument object.
PDFDocument pdf = new PDFDocument();
// Create a file stream with PDF information.
FileStream stream = new FileStream("sample.pdf", FileMode.Open);
// Load PDF document from file stream.
// Set a target width for gif image.
int width = pdf.GetPageWidth(0) / 2;
// Set a target height for gif image.
int height = pdf.GetPageHeight(0) / 2;
// Convert the first page of PDF file to image with the desired size.
Bitmap gif = pdf.ToImage(0, width, height);
// Save image to gif format.
Here's a useful online guide that you may read, C#.NET guide: how to set output image converted from PDF, which describes how to customize GIF image size and quality by changing DPI, as well as resetting its width and height.
.NET PDF to Image Software
.NET PDF to Image Converting
ASP.NET: Change PDF to TIFF
.NET: Change PDF to JPEG
.NET: Change PDF to PNG
C#: Change PDF to PNG
C#: Change PDF to Multiple Pages TIF
C#: Change PDF to JPEG
VB.NET: Change PDF to BMP
VB.NET: Change PDF to Multi-page TIFF
View All Image Types >>
I'd like to say this is a very powerful and easy to use tool. The functionality of it is really great. It saves me quite a bit of time. Another reason that prompts me to by your product is that the price is cost-effective compared to other providers.
SUPPORT SYSTEM: MICROSOFT WINDOWS XP, WINDOWS VISTA, WINDOWS 7, WINDOWS 8, WINDOWS SERVER. SUPPORT PLATFORM: .NET FRAMEWORK, VISUAL BASIC, VISUAL C#, ASP.NET, JAVA, JDK, SWING, APPLET, JSP, SERVLET, J2SE, J2EE. SUPPORT BARCODE TYPE: QR CODE, DATA MATRIX, PDF417, AZTEC CODE, CODE 128, CODE 39, CODE 93, CODABAR, EAN 13, EAN 8, UPCA, UPCE, ITF14. SUPPORT IMAGE FORMAT: JPEG, JPG, PNG, GIF, TIFF, TIF, BITMAP, BMP. SUPPORT VIEWER: MOZILLA FIREFOX, INTERNET EXPLORER, GOOGLE CHROME, OPERA, SAFARI, ADOBE and ACROBAT PDF.
Copyright © pqScan 2010-2017. All Rights Reserved.