This is an overview of the functions of the pdfforge.dll
Function AddTextToPDFFile
Adds text to a number of pages.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
int fromPage: First page where text is added
int toPage: Last page where text is added
ref PDFText textObject: PDFText Object containing the text to add
Return Value:
int: Number of pages that have been edited. 0 in case of an error.
Function CopyPDFFile
Copies a number of pages from an existing to a new file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
int fromPage: First page where text is added
int toPage: Last page where text is added
Return Value:
int
Function CreatePDFTestDocument
int CreatePDFTestDocument(string destinationFilename, int countOfPages, string additonalText);
Parameters:
string destinationFilename: Filename of the destination pdf file
int countOfPages: Number of pages that will be aAdditional text that will be added
Return Value:
int
Function EncryptPDFFile
Encrypts a given file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
ref PDFEncryptor enc: PDFEncryptor Object
Return Value:
no return value
Function FileLength
Retrieve the size in byte of a pdf file.
Parameters:
string filename: Filename of the source pdf file
Return Value:
int: Size of the file
Function GetMetadata
Retrieves a single metadata field value from the given pdf file.
Parameters:
string sourceFilename: Filename of the source pdf file
string key: Key of the metadata value to retrieve.
Return Value:
string: Value of the metadata field.
Function Images2PDF
Embeds a list of images into a pdf file.
Parameters:
ref string[] sourceFilenames: A list of images files to embed
string destinationFilename: Filename of the destination pdf file
bool fitImage: Fit image to page size
Return Value:
int
Function MergePDFFiles
Merges a list of pdf files in one pdf.
Parameters:
ref string[] sourceFilenames: Filenames of the source pdf files that will be merged
string destinationFilename: Filename of the destination pdf file
Return Value:
no return value
Function NumberOfPages
Retrieve the number of pages in a pdf file.
Parameters:
string filename: Filename of the pdf file
Return Value:
int: Number of pages in the pdf
Function NUp
Places n pages of the source file on each page of the destination file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
int pagesPerPage: Number of pages to place on one page
Return Value:
int
Function PDFVersion
Retrieve the version of a pdf file.
Parameters:
string filename: Filename of the pdf file
Return Value:
string: PDF version
Function RemoveEmptyPagesFromPDFFile
Removed empty pages from the pdf file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
Return Value:
int
Function RemovePageFromPDFFile
Removes a single page from the pdf file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
int pageNumber: Number of the page to remove
Return Value:
int
Function SetBackgroundColor
Changes the backgruond color of a number of pages in a pdf file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
int fromPage: First page where color is set
int toPage: Last page where color is set
byte Red: Color value
byte Green: Color value
byte Blue: Color value
Return Value:
int
Function SetMetadata
Sets the metadata of a pdf file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
string author: Value for the field "author"
string creator: Value for the field "creator"
string keywords: Value for the field "keywords"
string subject: Value for the field "subject"
string title: Value for the field "title"
Return Value:
no return value
Function SetMetadataKey
Sets a single metadata field.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
string key: Key of the field to set
string value: Value to set
Return Value:
bool: Shows the success of the action.
Function SignPDFFile
Signs a pdf file with a digital signature.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
string certficateFilename: Filename of the certificate
string certifcatePassword: Password of the certificate
string signatureReason: A reason to display with the signature
string signatureContact: Name of the contact
string signatureLocation: Location, where the file was signed
bool signatureVisible: Adds a visible signature to the file
int signaturePositionLowerLeftX: Lower left x-position
int signaturePositionLowerLeftY: Lower left y-position
int signaturePositionUpperRightX: Upper right x-position
int signaturePositionUpperRightY: Upper right y-position
bool multiSignatures: Allow to add additional signatures after signing the file
ref PDFEncryptor enc: Encryptor Object to use
Return Value:
no return value
Function SplitPDFFile
Description
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
Return Value:
int
Function StampPDFFileWithImage
Stamps a pdf file with an image.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
string imageFilename: Filename of the image
int fromPage: First page to add the stamp
int toPage: Last page to add the stamp
bool overUnder: Determines if image is placed above or below the existing content
float fillOpacity: Opacity of the image
int blendMode: Blend mode
Return Value:
int
Function StampPDFFileWithPDFFile
Stamps a pdf file with a pdf file.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
string imageFilename: Filename of the image
int fromPage: First page to add the stamp
int toPage: Last page to add the stamp
bool overUnder: Determines if stamp is placed above or below the existing content
float fillOpacity: Opacity of the image
int blendMode: Blend mode
Return Value:
int
Function UpdateXMPMetadata
Updates XMP metadata.
Parameters:
string sourceFilename: Filename of the source pdf file
string destinationFilename: Filename of the destination pdf file
Return Value:
no return value