C# code tutorial

PDF to Image PDF Creating & Inserting PDF Digital Signature PDF Extracting PDF Processing & Editing PDF Protecting PDF Chart PDF Barcode

Popular .NET SDK


How to Convert PDF to GIF graphic format.

Users would prefer to change PDF files into images like GIF, because it is much more convenient to view images than PDF in any platform. You can open images easily without installing additional program, and image is friendlier than PDF in displaying in portable devices.

PDF to Image Converter for .NET is a leading file conversion SDK that can convert any PDF files you need to GIF image format without using Adobe PDF reader. With the help of high performance PDF to gif conversion APIs, you can get output Gif raster images from PDF pages perfectly with high-quality.

If you are searching for a standalone solution for PDF to Gif conversion in C#, XsPDF .NET PDF to Gif converting component is the right choice. We provide fully tested .net library for your applications development. In addition, the price for our product is affordable and competitive on the market. To begin with, you can download the free version and use the sample code below in your project to test.


// Create a PDF converter instance by loading a local file 
PdfImageConverter pdfConverter = new PdfImageConverter("sample.pdf");

// Set the dpi, the output image will be rendered in such resolution
pdfConverter.DPI = 96;

// the output image will be rendered to grayscale image or not
pdfConverter.GrayscaleOutput = false;

for (int i = 0; i < pdfConverter.PageCount; i++)
{
    // Convert each pdf page to gif image with original page size
    //Image pageImage = pdfConverter.PageToImage(i);
    // Convert pdf to gif in customized image size
    Image pageImage = pdfConverter.PageToImage(i, 500, 800);

    // Save converted image to gif format
    pageImage.Save("Page " + i + ".gif", ImageFormat.Gif);
}

More Excel tutorial