EasyManua.ls Logo

Adobe ACROBAT FORMS JAVASCRIPT OBJECT - Doc Object; Doc Access from JavaScript; Doc Object Properties

Adobe ACROBAT FORMS JAVASCRIPT OBJECT
64 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Acrobat Forms - JavaScript Object Specification
20
Doc Object
The JavaScript Doc object provides the interfaces between a PDF document open in the viewer
and the JavaScript interpreter. It provides methods and properties of the PDF document.
Doc Access from JavaScript
Accessing the Doc object from JavaScript can be done either through the this Object, which
usually points to the Doc object of the underlying document. The target event property points
to the field that initiated the event for all mouse, calculate, validate, and format events. For all
other events, it directly points to the Doc object. The examples below illustrates the use of the
Event object to access the Doc object of the underlying document.
// In Mouse, calculate, validate, format events
var doc = event.target.doc;
// In all other events
var doc = event.target;
Doc Object Properties
author
Type: String Access: R/W
This property defines the author of the document.
this.author = "Robert Frost";
calculate
Type: Boolean Access: R/W
If this property is set to true, it will allow calculations to be performed for this document. If
set to false, this property prevents all calculations from happening for this document. Its
default value is true. This property supersedes the application level calculate property whose
use is now discouraged.
creator
Type: String Access: R
This property defines the creator of the document (e.g. “Adobe FrameMaker”,“Adobe
PageMaker”, etc.).
4.0

Table of Contents

Related product manuals