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
4.0
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.).
Acrobat Forms - JavaScript Object Specification
20
Index Bookmark Pages Text
Previous Next
Pages: Index All Pages
This HTML file was created by VeryPDF PDF to HTML Converter product.