Using JavaScripts
You can add custom JavaScript actions to your PDF files.
Click Document > JavaScript and choose from the following:
To add JavaScript actions to PDF document events
-
Choose Set Document Actions.
-
Select the Document event in the left window.
-
Click the Edit button.
-
Write your JavaScript in the JavaScript Editor text window.
-
Repair any reported syntax errors and click OK again.
-
Click OK.
To edit your script directly
-
Choose JavaScript Console.
-
Compile your script.
To create custom scripts
-
Choose Document JavaScripts.
-
Click Add.
-
Name your script for identification and click OK.
-
Click Edit, and compile your script. When done, click OK.
-
Click Close to finish.
Provided that your script is correct, and it is supported by the version of your PDF, the set event will execute the specified action.
Example
E-mailing the PDF that you have just saved:
-
Select Document Save Completed in the Set Document Actions dialog.
-
Click Edit.
-
Type in the following script: this.mailDoc(true);
-
Click OK.
After you have successfully saved the PDF, a new, blank e-mail message will pop-up with your PDF attached to it.