PDF Automation Station

PDF Automation Station

How To Create Your Own PDF Action (Batch Process) Tool

Acrobat Pro has a very cool feature called the Action Wizard (formerly known as Batch Process). As the old name implies, it allows users to create processes and apply them to an entire batch

David Dagley, CFP®'s avatar
David Dagley, CFP®
Nov 11, 2023
∙ Paid

black and gold round metal
Photo by Danil Shostak on Unsplash

of PDF files.  You can choose from a list of preselected Acrobat functions or write your own custom script and run the process Execute JavaScript.  Like the mouse up button action, I rarely use anything from the preselected list because you can program a script to do exactly what you want.  The Actions I create almost always Execute JavaScript. 

When someone requests custom work to do something that is on the preselected list, I simply point them to the Action Wizard and let them know tit's already been done for them.  There's also an Actions Exchange where you can share Action files you've created with other users, and in turn, you can download and install Action files that others have shared.

I have one issue with the Action Wizard and the Batch Process before it, and it is this: There is no setting that allows you to run a script only once, before the files are processed, or only once, after the files are processed.

The addition of this feature seems simple enough and would solve the dilemma many have faced when creating Actions.

Suppose for example, you want to run a script that pops a dialog window for gathering specific options from the user about the action that will run.  Because there is no setting to run this script before the Action starts processing files, it will pop up for every file that opens, but you only want it to pop up once.  A workaround for this is to test for a global variable and only pop the dialog window if the variable returns undefined.  When the dialog is dismissed, the global variable is created.  When the next file opens the global variable is defined, and the dialog does not pop up again for the remainder of the action.  This is exactly what we want.

The issue, however, comes when the Action is run again in the same session.  Now, because the global variable still exists, the dialog window does not pop up when we want it to.  Unless the user shuts down and restarts Acrobat between different sessions of the same action, or manually deletes the global variable, the popup dialog window is never seen again.  This is exactly what we do not want.

** Breaking News Update**

I finally solved the issue so that no extra steps are required by the end user, and the actions now run seamlessly. I will be outlining the solution in my next article. Make sure you are a PDF Automation Station subscriber, and I will deliver the solution to your inbox in one week.

Get the course above, and a suite of automation tools for FREE with a Professional subscription.

Keep reading with a 7-day free trial

Subscribe to PDF Automation Station to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2026 David Dagley · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture