Working With Document Level Javascript Actions - Adobe 12001196 - Acrobat - Mac Manual

Javascript
Hide thumbs Also See for 12001196 - Acrobat - Mac:
Table of Contents

Advertisement

2. Type the name of the script in the text box.
3. Click Add.
4. Copy and paste a predefined custom script, or type the script in the text box provided,
and then click OK. The name of the script appears in the lower text box.
5. Click Close.
6. Choose Advanced > JavaScript > Debugger to open the console window. When a
JavaScript is executed, you are alerted to any script errors by a message in the console
window. Click Clear to clear the results, or Close to close the window.
To edit or delete an existing document level JavaScript:
1. Choose Advanced > JavaScript > Document JavaScripts.
2. To edit a document level JavaScript, select the JavaScript from the list, and click Edit.
Change the existing text, or paste a predefined custom script into the text box provided.
Click OK to accept and conclude the editing.
3. To delete a document level JavaScript, select the JavaScript from the lower text box, and
click Delete.
4. Click Close.
To create a plug-in level JavaScript:
1. Create a text file containing the JavaScript function. Name and save the file with a .js
extension.
2. Copy the text file into the JavaScripts directory inside the Acrobat folder, or into the
JavaScript folder in your system directory.

Working with document level JavaScript actions

In addition to JavaScript functions that can be accessed by any JavaScript in the current
document, you can create document level JavaScript actions that apply to the entire
document. When you do something that affects the entire document, like printing it, the
document level action applied to that occurrence will run. You create and edit the
JavaScript code in the editor of your choice. You can later edit all your document level
JavaScript actions at once.
To set a document level JavaScript action:
1. Choose Advanced > JavaScript > Set Document Actions.
2. In the Document Actions dialog box, choose the appropriate document occurrence.
Document Will Close runs the JavaScript while the document closes.
Document Will Save runs the JavaScript while the document is saved.
Acrobat JavaScript Scripting Guide
Using Acrobat JavaScript in Forms
Working with document level JavaScript actions
4
61

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Acrobat 6.0

Table of Contents