Actions!! (Macros for Acrobat X)

Thom ParkerMarch 10, 2011

Was this tutorial useful to you?

Rating:

Log in to rate:
Print version of this tutorial

If you use Acrobat for document production or workflow processing, then you probably have to spend a lot of time repetitively clicking on menu items and filling out dialogs. I have worked on processes where at least 10 different operations had to be applied to a PDF -- crop, rotate, add footers and a watermark, place specific annotations, and so on. It used to be that to get Acrobat to efficiently perform these kinds of multiple operations, you had to be a PDF Stud, or hire one. But that's no longer true. With the introduction of Acrobat X, Adobe has made Acrobat more powerful, efficient and much more accessible to ordinary users than ever before. Actions are a big part of how that has come to be.

What's an Action?

In Acrobat 5, Adobe introduced Batch Processing. A Batch Sequence was a series of standard operations that could be applied to a single PDF or to an entire folder of PDFs. When the sequence is applied to one or more PDFs, it's called a Batch Process. A great idea, but this feature involved several rather non-intuitive dialogs and has always been a bit clunky and inaccessible to most users, i.e. not for the faint-of-heart.

Acrobat X brings this same idea into the 21st Century, putting it front-and-center on the user interface and simplifying the dialogs, thus making it useful to anyone who can click a mouse.

To put it simply, an Action is a hands-free way to apply multiple operations to one or more PDFs at the same time. The operations that make up an Action are pretty much exactly the same operations available on the Acrobat Tools Palette. Actions are very similar to the concept of macros in other popular software applications.

Accessing Actions

Actions are available from two locations in Acrobat -- the File menu and the Tools Palette. Both contain an item called the Action Wizard (Figure 1), which displays a sub-menu of options for the Actions tools. Both locations display exactly the same options; they are just different locations for accessing the same thing. The first two items are for managing the Actions, "Create New Action" and "Edit Action." The following items are the names of Actions that have already been created. Acrobat comes with a number of useful Actions already built-in and new ones can be created from scratch, imported, or copied and modified from an existing Action.

Any number of Actions can be created, but only the seven most recently used actions are shown in the list. The other Actions are listed in the sub-menu under the "More Actions" option.


Figure 1 – Getting to the Action menus

Running an Action

To run an Action, just click on the Action's name in either the File Menu or the Tools Palette. The first thing displayed is a dialog for verifying the Action to be run (Figure 2).


Figure 2 – The first dialog displayed when an Action is run

The dialog shows everything about the Action. The best feature of this dialog is that it's optional. Use the checkbox on the bottom left to stop the dialog from popping up every time the Action is run.

Clicking on the next button starts the Action. What happens next depends entirely on how the action is set up. For example, the "Start With" entry on the dialog in Figure 2 shows that this action will operate on the PDF currently open in Acrobat. So when "Next" is pressed, each of the "Steps" listed is applied to the current PDF in the order listed. These steps can have preset values, in which case they are applied silently, or they can be marked as interactive, in which case the step would display an input dialog. As each step is processed, Acrobat displays a progress dialog at the bottom right of the page display area (Figure 3).


Figure 3 – Information on the Action's progress. Clicking on the "X" will quit the Action.

Some steps in an Action require user input to continue. For example, Step 3 for the Action shown in Figure 2 is an "Instruction Step." This step will display a small input dialog on the bottom right side of the page display (Figure 4). At this point, the Action is paused and the working PDF is displayed. The user can then work on the PDF to complete the task outlined in the step. In this case, the instruction is to add bookmarks to the PDF. However, the user can in fact perform any operation on the PDF. The instruction step is just a guide for the process.


Figure 4 –
Instruction step. The Action is paused until the user press "Next Step."

When the task is completed, the user clicks on "Next Step" to continue on to the next step in the Action.

Finally, when all the steps in the Action are complete, Acrobat will perform the "Save To" operation. As shown in Figure 2, the "Save To" for this action is set to "Ask When Action is Started," which displays the file "Save As" dialog. This text is a bit misleading since the user is actually asked at the end of the Action, not when it is started.

The process outlined here shows many of the possible interactions an Action can have. However, there are many more, and exactly what an Action does depends on how it was designed.

Creating and modifying Actions

Selecting the "Edit Actions" item from the "Actions Wizard" displays the dialog shown in Figure 5.


Figure 5 – The Actions list dialog. This is the control panel for manipulating the Actions.

From this dialog, any of the existing Actions can be edited, deleted, copied or exported. The copy option is very important because Acrobat's built-in Actions can't be edited directly. Instead, if a variation of a built-in Action is needed, it has to be copied first, and then the copy can be edited. An Action is edited by clicking on the "Edit" button, which displays the Action Edit dialog. This is the same dialog displayed when the "Create new Action" item is selected from the "Action Wizard" (Figure 6). Of course, when "Create new Action" is selected, the command list on the dialog is empty, as shown in Figure 6.


Figure 6 – The Action-editing dialog. This is where Actions are created and modified.

There are three parts to all Actions. They are labeled "Start with," "Steps" and "Save To." The "Start with" part determines the source of the files the Action will be applied to. This can be a single file, an entire folder of files, or it can be determined by the user when the Action is run. One of the most useful options is "Ask When Action is Started." This option displays a dialog for collecting files from the user. The big advantage to this option is that the file list is ordered, i.e., the Action is applied to each file in the order it appears in the list. Something not immediately obvious is that the input files do not have to be PDF. They can be any file format that can be converted to PDF. Acrobat will do the conversion before the Action is applied.

The last part "Save to," determines how a file is saved after the Action is applied. The options include not saving the file at all, saving back to the original file folder, saving to a target folder, and asking the user what they want to do. The "Don't save" option is used in a couple different situations. First, if the Action operates on a file already open in Acrobat, it may be desirable to allow the user to decide how and when the file will be saved. Another situation is when the Action only collects data on the files and does not make any changes.

The "Steps" are the real heart of the Action. This is an ordered list of commands that will be applied to the file, or set of files, specified in "Start with." The left side of this dialog shows a list of command categories. Notice that the category names are nearly the same as the names of the categories on the Tools Panel, and for the most part the commands that can be added to an Action are the same as the commands that can be run manually from the Tools Panel. There are, however, some differences. Not all tools in Acrobat are suitable for use in an Action, and conversely there are some commands that make sense for an Action that do not make sense as a tool.

To add a command to the "Steps," click on it (Figure 7). As many commands as necessary can be added, and the same command can be added more than once. Each command has a remove button on the far right, and the order can be changed by dragging and dropping individual commands already in the list.


Figure 7 – Commands are added to the Action with a single click.

Many of the operations require some kind of input. For example, the rotate-pages command requires the amount of rotation and the page range where the rotation will be applied. Each command in the "Steps" includes a button for setting these options and a checkbox for prompting the user to enter this input data. If the checkbox is left blank, the command will run silently using the preset input values. But if it is checked, the input dialog will be displayed to the user at the time the Action is run.

Figure 7 shows the options under the "More Tools" category. This is where all the tools are placed that aren't available on the "Tools Panel" and don't fit neatly into the other categories. The one shown in the figure is "Execute JavaScript." This command is particularly useful for advanced Acrobat users. All the other commands are relatively static. Each command does one specific thing in a pre-programmed manner, whereas a script can be written to perform operations that are not on the list, and to apply operations in an intelligent way. For example, a script could use information stored on the document to control the operation, or to decide whether or not the operation is applied at all.

Sharing Actions

Not only are Actions a powerful productivity tool because they offer a way to group operations, they are also powerful because they can be shared easily with other users. The Actions list dialog (Figure 5) has buttons for both importing and exporting Actions. Sharing is simply a matter of exporting an Action to a ".sequ" file and then e-mailing the file to another user with Acrobat X. To import the Action, all the user has to do is double click on the file icon (Figure 8).


Figure 8

The ".sequ" file extension is exactly the same file extension used for Batch Sequence files in the previous versions of Acrobat. In fact, the file format is also exactly the same. If Acrobat X was installed over a previous version of Acrobat, then the old Batch Sequences will automatically appear in the Actions list. But, if Acrobat X is installed on a new system, then the old Batch Sequences can be imported into Acrobat X as Actions by copying them to the new machine and double clicking on them.

Give Actions a try and see how simple they are to use and how much time they can save you.

Products covered:

Acrobat X ProAcrobat X Suite

Related topics:

Actions & Tool Sets

Top Searches:

Create PDF, Web conferencing, PDF converter, HTML forms

7 comments

Lori Kassuba

10, 2013-04-03 03, 2013

Hi Steve,

Since you have the Pro. version of Acrobat X, you could do this with an Action on a folder of individual PDFs. All you need to do is create a New Action and include the Insert page command step with your cover page and then Save the files. Here is a tutorial on how to create an Action in case you’re not familiar:
http://acrobatusers.com/tutorials/how-do-i-create-a-new-action

Thanks,
Lori

Steve

5, 2013-04-02 02, 2013

Hi,
I am using Adobe X Pro, and would like to find out how, or if there is a way, to make multiple, two-sided pdf files. What I am doing is taking several documents, then adding a cover sheet to each individual document. How we do this now is we make copies of the original documents, place those copies in the raw paper feeder (upside down) then take the cover sheet and run it for however many copies we made of the documents we need. Make sense? Hope someone can help!

Lori Kassuba

10, 2013-03-11 11, 2013

Hi Ryan,

Actions are used to automate specific features in Acrobat. They’re not designed to automate filling forms. You’ll need to use JavaScript in your form to do this.
Here is a tutorial to get you started:
http://acrobatusers.com/tutorials/conditional-execution

Thanks,
Lori

Ryan Schnurer

3, 2013-02-27 27, 2013

Will this feature enable me to allow user choices?  For example, can I write a yes/no question as an instruction step and based on the user’s input perform the next action or skip the next action?

David Beynon

9, 2013-01-20 20, 2013

Hi
Could this capabilty be used to automatically repeat display of a pdf document? I am using a PC screen to show some images on automatic scrolling, but want the scrolling to start again once the last page is reached.
David

Hi David,

Actions are not designed to do this but if you have the PDF open in Full Screen mode, you can use the Full Screen preference (under Edit > Preferences > Full Screen) to Loop after last page to do this.

Thanks,
Lori

Thom Parker

6, 2012-09-04 04, 2012

You have to be a bit more specific about what you mean by a “digital signature”.  There are two kinds.  First, there is a digital copy of your hand written signature, called a wet signature, and it is very popular right now. The “Sign Now” service applies wet signatures, but it is easy to do with an “Action”. The first part of the process is to create a wet signature stamp. Then use a script to apply the stamp to the PDF. Another method is to place a button on the PDF at the location you want the signature, and then import an image into the button.  Ask on the regular forums for details.

The second type of “Digital Signature” is an encryption method called a digital ID. You apply a digital ID with a signature form field. The details of this are a bit complex. Again, please ask about the details on the regular forums.

rb macario

11, 2012-08-30 30, 2012

Hello, i just want to ask on how to automate the putting of digital signature to a digital signature box using Action Wizard.

Leave a reply:

Fields marked with * are required.

Download
Acrobat XI trial

Get the trial now

Get expert advice.

{/exp:ce_cache:it}