2019.2

Table Of Contents
IPDF methods reference
Close()
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.
Syntax
VOID Close ()
Note: Before using Close() in Javascript, you should call the CollectGarbage() global method to
ensure all references to pages are properly discarded. This additional statement is not required
with other languages. For instance:
var objPDF = Watch.GetPDFEditObject();
objPDF.Open(Watch.GetJobFileName(), false);
var objPages = objPDF.Pages();
var objPage = null;
for(var i=0; i<objPages.Count(); i++) {
objPage = objPages.Item(i);
}
objPage=null;
objPages=null;
CollectGarbage();
objPDF.Close();
If you run the above code without calling the CollectGarbage() method, the Close() method will
error out.
Create(filename)
Creates a new empty PDF file. See also: "Save()" on page262.
Syntax
VOID Create (STRING filename)
filename
Name of the file to create. The file is not physically written to disk until IPDF.Save() is called.
Page 256