Use JavaScript
You can add custom JavaScript actions to your PDF files.
Disable JavaScript if it is creating undesired actions in PDF files you receive, or to respect compliance requirements.
To enable or disable JavaScript in the program, go to
.To access JavaScript features, click JavaScript on the Edit tab of the ribbon.
Add JavaScript actions to PDF document events
- Select Set Document Actions.
- Select the document event in the left window.
- Click Edit.
- Write your JavaScript in the JavaScript Editor text window.
- Repair any reported syntax errors and click OK again.
- Click OK.
Edit your script directly
- Select JavaScript Console.
- Compile your script.
Create custom scripts
- Select 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.
Email the PDF that you have just saved
JavaScript actions may be vulnerable to malware attacks.
- 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 email message appears with your PDF attached to it.