I have documents I would like to perform a special action on each time that I close, save or print.
The PDF-XChange Editor offers the ability to edit Document Properties, including adding actions to documents. This allows advanced users to write scripts that can be applied to the entire document each time a certain action is performed. These actions can be found by opening the Document in question, and pressing Ctrl+D.
If you are looking to add special actions to links in your documents, Please see this KB for more information.
In the PDF-XChange Editor
1. Open the document you wish to modify and Press Ctrl+D.
The Document Properties window will open.
2. Navigate to the Actions tab:
3. Select when to perform the action, for this article we will choose Before Document Saving, then click Edit:
4. The Edit Action dialog will appear, paste the following JS code into the window and press OK.
**This script will cause the document to be flattened every time that it is saved, just before saving.
These scripts are saved directly to the document, and should remain in place regardless of what PDF manipulation software is used with it in the future.
5. Click OK and save the document.
You should now find that any comments, such as the Rectangle tool, have been flattened, and must now be edited using the Edit Content tool, instead of the Select Comments tool.