PDFConverterX Demo Source

A sample VB program is provided to illustrate proper usage of this PDFCX. Converting a PDF file is as simple as filling out a few properties, and then calling the ConvertPDFToFile() method. A sample piece of VB Code is shown below:

Public Function ConvertPDFToFile(sInputFile As String, _

sOutputFile As String, _

bIgnoreProtect As Boolean, _

sPasswordUser As String, _

sPasswordOwner As String, _

lFirstPage As Long, _

lLastPage As Long, _

lTargetFileType As Long, _

sErr As String) As Long

Dim lResult As Long

Dim bSingleShot As Boolean

Dim sPassword As String

bSingleShot = False

sPassword = ""

Set PDFX1= CreateObject("PDFConverterX.PDFX")

PDFX1.Key = "0" ' Set to valid key upon purchase

PDFX1.InputFile = sInputFile

PDFX1.OutputFile = sOutputFile

PDFX1.PasswordOwner = sPasswordUser

PDFX1.PasswordUser = sPasswordOwner

PDFX1.TargetFileType = lTargetFileType

PDFX1.FirstPage = lFirstPage

PDFX1.LastPage = lLastPage

ConvertPDFToFile = PDFX1.ConvertPDFToFile()

sErr = PDFX1.ErrorString

set PDFFX1 = Nothing

End Function