pqScan 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 image conversion APIs, you can get output Gif raster images from PDF file pages perfectly with high-quality. In this article, we will introduce you the effective way to convert PDF document into GIF images as required.
Raster Image GIF
Graphics Interchange Format, better known by its acronym GIF, is a bitmap image file format that was introduced by CompuServe in 1987 and has since come into widespread usage on the World Wide Web due to its wide support and portability.
Things You Should Do First
At the very beginning, programmers should prepare a feasible programming environment to use pqScan .NET PDF to Image Conversion Control for effective conversion from Adobe PDF document to GIF image in .NET.
- .NET Framework 2.0 and above
- Windows XP, Windows Vista, Windows 7, and Windows 8
- Windows Server Operating Systems (2003/2008/2012)
- 32-bit and 64-bit systems
- .NET Windows Forms, ASP.NET web, and Console applications
How to Count PDF Page
After creating your .NET project, you may firstly use pqScan .NET PDF to Image Library to get PDF document page count. And then choose target page(s) to convert to Gif.
How to Set GIF Definition via DPI
DPI of the current PDF document page could be set to change the definition of rendered gif image.
How to Open and Read PDF into .NET Application
Two methods are supplied to read and load PDF document into your .NET application. One is from local PDF file, and the other is from stream which contains file stream and memory stream.
public bool LoadPDF(string fileName);
public bool LoadPDF(Stream stream);
How to Obtain Size Information of PDF Page
If you need the original size of loaded PDF file page, please use the .NET programming code below.
public int GetPageHeight(int pageIndex);
public int GetPageWidth(int pageIndex);
How to Get GIF Image (with User-defined Size)
Page index here is used to define which PDF page you want to change to GIF image file. .NET developers can feel free to transform any of PDF page or a range of pages to raster image Gif.
Public Bitmap ToImage(int pageIndex);
If you want to customize the size of output .gif, please add the following .NET class code.
Public Bitmap ToImage(int pageIndex, int width, int height);