ConvertPDFToFile()

Description: This method is used to display a built in dialog box (shown below) for quick modification of the many text setting parameters.

Parameters: The following properties are used by this function: InputFile, OutputFile, PasswordOwner, PasswordUser, TargetFileType, FirstPage. LastPage

Return Values (Long Integer):

Return Value

Meaning

0

Successfully converted the file

-1

Unable to open necessary SII DLL

-2

InputFile is invalid or could not open

-5

Couldn't read the page catalog

-6

PDF File is damaged

-7

File is encrypted and password was incorrect or not supplied

-8

User does not have permission to read

-9

Invalid last page range specified

-10

Shareware expired

-11

Conversion failed

See Also: InputFile, OutputFile, PasswordOwner, PasswordUser, TargetFileType, FirstPage. LastPage

Example:

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 = ""

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

End Function