Available Properties and APIs
Find the Target PDF
There are two ways to define a PDF source file to read into your Visual Studio .NET application. Both of them return true if the file is loaded successfully, while false if load failed.
- Load and read PDF from local file on your computer disk.
public bool LoadPDF(string fileName);
- Load and read PDF from file stream or memory stream.
public bool LoadPDF(Stream stream);
Count PDF Page(s)
.NET users may easily define a range of PDF pages to be turned to JPEG images. The following API may be used to return the number of pages in source PDF document.
DPI (Dots per Inch) Customization
DPI of the current PDF page could be set or get when you activate the DPI property. This may help you to set output image DPI.
Get PDF Page Size
If you need to know the original size of PDF file page, please use the codes below.
public int GetPageHeight(int pageIndex);
public int GetPageWidth(int pageIndex);
Get JPEG/JPG image
Page index is used here to assign which PDF document page to convert and change to JPG/JPEG.
public Bitmap ToImage(int pageIndex);
To change the height and width of JPEG/JPG image, please add the following .NET programming code.
public Bitmap ToImage(int pageIndex, int width, int height);