Acrobat JavaScript Tools
Exercise: Working with the JavaScript Console
2
Enabling JavaScript
In order to use Acrobat JavaScript, you must first verify that JavaScript has been enabled. In
order to execute code from the Acrobat Console, you will also need to ensure that the
JavaScript Debugger is enabled, since the console window is a component within the
JavaScript Debugger interface.
Enable JavaScript, the Debugger, and the Console by performing the following steps (see
1.
Launch Acrobat.
2.
Select
Edit > Preferences
to open the
Preferences
dialog box.
3.
Select
JavaScript
from the list of options on the left side of the dialog box.
4.
Select
Enable Acrobat JavaScript
if it is not already selected.
5.
In the
Preferences
dialog box, select
Enable JavaScript Debugger after Acrobat is
restarted
from the JavaScript Debugger options.
6.
Select
Enable interactive console.
This option enables you to evaluate code that you
write in the console window.
7.
Select
Show console on errors and messages.
This ensures that whenever you make
mistakes, the console displays helpful information.
8.
Click
OK
to close the Preferences dialog box.
9.
Close and restart Acrobat.
Acrobat JavaScript Scripting Guide
33