PDF object
The PDF object implements the IPDF interface. This interface defines methods to open, close and save files, as well as to access meta information such as the XMP attachment. The interface also implements a Pages collection object to access the list of pages in the PDF.
To instantiate the PDF object, call the Watch.GetPDFEditObject method in Workflow's scripting environment.
Javascript implementation: var myPDF = Watch.GetPDFEditObject();
VBScript implementation: set myPDF = Watch.GetPDFEditObject
IPDF methods
Name |
Return type |
Description |
---|---|---|
|
Closes the PDF file. If changes were made but not saved, they are silently lost. All IPage objects must be released before closing a PDF. |
|
|
Creates a new empty PDF file. |
|
Retrieves the contents of the Document Information Dictionary from the PDF. |
||
|
Returns the version of the underlying PDF file format. For example, for PDF 1.7, 1 is returned in major and 7 is returned in minor. |
|
STRING |
Retrieves the XMP attachment embedded in the PDF. |
|
STRING |
Retrieves the entire extractable text from the PDF in XYML format. |
|
BOOL |
Returns True if the PDF file is password-protected. When a file is password-protected, the OpenEx() method must be used instead of the Open() method. |
|
|
Merges the pages of pdfFilename (the source) with the pages of the current PDF (the destination). |
|
MergeWith2(pdfFilename, xnum, ynum, xoffset, yoffset, scaleFactor) |
|
Overlays each page of pdfFilename (the source) onto pages of the current PDF (the destination) in a grid whose size is specified by xnum and ynum. The pages are laid from left to right and then from top to bottom. |
|
Opens an existing PDF, optionally repairing it. |
|
|
Opens an existing, password-protected PDF, optionally repairing it. |
|
IPages (see Pages collection object) |
Provides access to the Pages collection of the PDF. |
|
|
Prints a range of PDF pages to the specified Windows printer with default options. |
|
|
Prints a range of PDF pages to the specified Windows printer with specific printer options stored in an IPdfPrintParams structure. |
|
|
Saves changes to the PDF file. The version of the PDF file format is the highest possible for a newly created file and is unchanged when saving an existing file, unless the SetVersion method was called in which case the file format used will be the one set by SetVersion. |
|
|
Sets the contents for the PDF's Document Information Dictionary. |
|
setTolerances(tolerableDeltaWidth, tolerableDeltaHeight, tolerableDeltaFontHeight, tolerableGap) |
|
Sets the floating point values for the tolerable factors. |
|
Sets the version of the underlying PDF file format. This is applied when the file is saved. |
|
|
Sets the XMP attachment by replacing the existing one with xmpPacket. |