easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

Convert Method

Convert PDF to Image.

Sub Convert(InputFileName As String,
            OutputFileName As String,

void Convert(string InputFileName,
             string OutputFileName,
             string Password,
             int From,
             int To)

void Convert(String InputFileName,
             String OutputFileName,
             String Password,
             int From,
             int To) throws PDFDocumentException


Return Values



The page numbers do not use a zero-based indexing scheme, meaning that the first page has an index of 1, instead of 0.

In order to convert the entire PDF document, you can specify values From = -1 and To = -1, which indicates a range of first to last pages.

It is also possible to set only the To value to -1. For example, From = 3 and To = -1 indicates a range of third to last pages.

Example Usage

Set oConverter = CreateObject("easyPDF.PDFConverter.8")
Set oPDF2Image = oConverter.PDF2Image
oPDF2Image.ImageResolution = 72
oPDF2Image.ImageColor = CNV_IMAGE_CLR_24BIT
oPDF2Image.ImageFormat = CNV_IMAGE_FMT_JPEG
oPDF2Image.ImageQuality = 85
oPDF2Image.Convert "C:\test\input.pdf", "C:\test\output.jpg"