This object provides the interface between a PDF document open in the viewer and the JavaScript interpreter. It provides methods and properties for accessing the PDF document.
• The this object usually points to the Doc object of the underlying document.
• Some properties and methods, such as extractPages, app.activeDocs, and app. openDoc, return the Doc object.
• The Doc object can often be accessed through event objects, which are created for each event by which a JavaScript is executed:
• For mouse, focus, blur, calculate, validate, and format events, event.target returns the Field object that initiated the event. You can then access the Doc object through the Doc method of the Field object.
• For all other events, event.target points to the Doc.Use this to get the number of pages in this document:var nPages = this.numPages;// Get the crop box for "this" document:var aCrop = this.getPageBox();// Path relative to "this" doc:var myDoc = app.openDoc("myNovel.pdf", this);myDoc.info.Title = "My Great Novel";myDoc.saveAs(myDoc.path);myDoc.closeDoc(true);var myDoc = event.target.doc;var myDoc = event.target;
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.374.html