Acrobat JavaScript Overview
Acrobat JavaScript Object Summary
1
dbg
You can use the
dbg
object, available only in Acrobat Professional, to optionally control the
JavaScript debugger from a command line standpoint while the application is not
executing a modal dialog box. The
dbg
object methods offer the same functionality as the
buttons in the JavaScript debugger dialog toolbar, which permit stepwise execution,
setting, removing, and inspecting breakpoints, and quitting the debugger.
console
The
console
object is a static object available within Acrobat Professional that is used to
access the JavaScript console for displaying debug messages and executing JavaScript. It
does not function in Adobe Reader or Acrobat Standard. It is useful as a debugging aid and
as a means of interactively testing code.
global
The
global
object is used to store data that is persistent across invocations of Acrobat or
shared by multiple documents. Global data sharing and notification across multiple
documents is done through a subscription mechanism, which enables monitoring of
global variables and reporting of their values to all subscribing documents. In addition,
global
may be used to store information that pertains to a group of documents, a
situation that occurs when a batch sequence runs. For example, batch sequence code often
stores the total number of documents to be processed as a property of
global
. If
information about the documents needs to be stored in a
report
object, it is assigned to a
set of properties within
global
so it is accessible to the
report
object.
Util
The
Util
object is a static JavaScript object that defines a number of utility methods and
convenience functions for number and date formatting and parsing. It can also be used to
convert information between rich content and XML representations.
dialog
The
dialog
object is an object literal used by the
app
object’s
execDialog()
method
to present a modal dialog box identical in appearance and behavior to those used across all
Adobe applications. The
dialog
object literal consists of a set of event handlers and
properties which determine the behavior and contents of the dialog box, and may be
comprised of the following elements: push buttons, checkboxes, radio buttons, listboxes,
textboxes, popup controls, and containers and frames for sets of controls.
Acrobat JavaScript Scripting Guide
23