The Adobe Acrobat Action Wizard allows you to automate repetitive processes and save them as an action to be applied later to a single PDF, or an entire folder of PDFs. In older Acrobat versions, actions were known as Batch Processes. The Action Wizard allows you to export action files and save them to your hard drive so you can share them with other users, who can import the action files, without have to re-write them.
Before you attempt to create an action, you can check with the Acrobat Actions Exchange where you can download for free, action files that have been created by other users and uploaded to the exchange. One of the most popular downloads is the Find and Highlight Words action, described as follows:
This is an updated version of Rick Borstein’s Find & Highlight Words and Phrases Action that automates highlighting important words across multiple documents to quickly spot key information for Acrobat XI.
Other ways to support my work: Enroll in my eLearning JavaScript course for Acrobat Pro Purchase an an automation tool or a dynamic stamp from our online store Hire me for your PDF or Acrobat project. Start the conversation. Buy me a coffee Send me encouragement:
Built-In Processes and Custom Scripts
When creating actions there are many built-in processes that can be implemented in the order you choose by simply selecting them from the left column and moving them to the right.
All the categories in the left column expand to reveal several processes that can be added by simply selecting the process and clicking the arrow in the middle to move it to the right. Under More Tools is the process I use most frequently, Execute JavaScript. As I wrote in my first article on this site, How I Became A PDF JavaScript Expert:
Almost anything you can do with the User Interface (UI) in Acrobat Professional you can also do with a script, which makes automation of repetitive tasks possible.
JavaScript provides a lot more control over the details of your process and is not usually subject to UI version changes.
However, some built-in processes provide exactly what you need without having to write a script or reinvent the wheel. You can also put together an action that is combination of both. In some cases the built-in process would be difficult, or impossible to replicate with a script.
The aforementioned Find and Highlight Words action is an example of a combination of a built-in process and custom script, in which the built-in process portion would be difficult and unnecessary to replace with a script. The two parts of the Action are as follows:
The built-in Search & Remove Text processes is activated. This process does not actually remove text, it is the first step in the removal (redaction) process that marks text for redaction. Alternatively, you could write a script that searches every word on a page and marks it with a redaction annotation when a match is found. Since you can only search individual words this way, and not phrases, you would have to create a sub-loop for every word in the phrase that examines the next word in the phrase. This is very complicated and susceptible to errors. The Search & Remove Text process lets you specify multiple words and phrases and save these in the action:
The second step is simple script that converts the redaction annotations to highlight annotations.
Saving Changes
There’s actually a third step that saves the changed documents. This is standard in most actions. Without it, the changes will not be saved. However, there are many examples in which the Save process should not be included. One example is a script that has already saved the changes to another directory or with a different name. Another example is where the documents are tested for specific properties and the results are written to the console in a list.
Encryption/Password Protection
In many cases you might have a number of password protected PDFs that you need to make changes to. As long as the password is identical for all documents, you can enter it once at the beginning of the action, allowing access to change the document before saving it with the password protection intact. There’s a setting in preferences that must be done first.
Press Ctrl + k or select Edit > Preferences from the Acrobat toolbar to open the preferences window.
Select Action Wizard from the categories column on the left.
Select Password Protection from the Security Method dropdown.
At the beginning of the action, the Enter Password popup dialog will be presented so the the documents can be changed. This popup will appear, whether the documents are password protected or not, so the setting should be changed to Do not ask for password if the action is going to be performed on documents that aren’t protected, in order to avoid the popup. If the setting change was accidentally left on, the user can simply cancel the popup and the action will continue without issue.
However, if the setting is Do not ask for password, and the action is run on password protected documents that prevent the changes for which the action is programmed, the changes will not be made and security error messages will print to the console for each protected document.
Password Protecting Documents With an Action
You can add password protection by selecting Encrypt under the Protection category of the Action Wizard list, or you can apply an existing security policy by writing a script that automates this process. Acrobat JavaScript genius Thom Parker describes how to apply a security policy using a script here. The setup of Security Policies for password protection is described in this article.
Overcoming Action Limitations
One of the features of the Action Wizard is that it does the same thing to every PDF in the folder on which it is executed. This can also cause problems. There is no way to program "do this before the Action starts running" or "only do this to the first document", or "do this after the last document is processed".
Adobe, if you’re listening - ahem - these would be valuable features to add to the Action Wizard in a future update.
This restriction has caused a lot of frustration for me because I like to use popup dialog windows to present choices that will guide the action. If the popup dialog is executed in the initial step of the action is will pop up for every single document processed and the remainder of the action will cease until the user dismisses the dialogs - not usually what we want. There is also no way to activate an action with a script, otherwise the script could be a menu item that triggers the dialog, then starts the action (without a dialog). I was so frustrated by this dilemma that I created my own "Action Wizard":
I also found, or figured out, four different methods for overcoming this dialog problem in the Action Wizard. All four had different issues. Finally I figured out number five which solves the issues of the previous four. You can read about all of the methods here: