|
Home |
Automating Acrobat
| |
Automating Acrobat can save you loads of time.
Automation is the process of simplifying a task through some kind of programming mechanism. Ideally this means creating a single toolbar button or menu item that completes the task in one go. Nearly any task that can be done with Acrobat can be automated, so any task that has to be performed repeatedly is ripe for automation. These tasks range from the absurdly simple to the insanely complex.For example, there are certain documents (such as the Acrobat JavaScript Reference) that I use daily. So I've added items to the Acrobat Help menu to open these files. Simple, but well worth it since these docs are used frequently. On the other end, I had a client that needed the same document to be stamped with individual customer info, secured, and then emailed to the customer. The customer information and emails were in an Excel spreadsheet. Since there were hundreds of entries, performing this task manually could take days; entry of the customer data would probably result in some errors; and there would probably be style differences in how the data was entered into the individual stamps. The automation script ran the entire process in a few minutes, data was transcribed exactly, and it was done the same way every time. Automating a task can take up time you might think is better spent manually performing the task. But this way of thinking is usually misguided. Automation can have profound benefits, and here's a list of the most obvious ones.
Advantages
- Performance - Some tasks that take hours can be reduced to minutes.
- Efficiency - The number of steps to complete a task are reduced.
- Consistency - Operations are performed in the same way every time.
- Elimination of errors - Human error is the biggest problem with manual entry.
- Eliminates having to remember or look up complex manual actions.
- Simplified training - It's much simpler to train an employee or customer to press a single button than to become experts with Acrobat.
There are several different ways to Automate Acrobat.
- Actions/Batch Processing
- Folder Level JavaScript
- External Program through the IAC
- Plug-in
- Combination - Mix and Match methodologies
Actions (old Batch Processing)
Only available in Acrobat Professional. Used to be called Batch processing, changed to Actions in Acrobat X. Actions are a way to apply a series of commands to one or more files and is the type of automation accessible to the largest number of users since it does not require scripting. Acrobat's Action wizard provides a set of predefined commands that the user can choose from to build a custom sequence. These commands are almost exactly the same operations that can be applied manually from the regular Acrobat Tools. But one of the commands is "Run a JavaScript" which adds extra flexibility to what can be done with an Action. The JavaScript commands that can be used in an Action are nearly the same as what can be used in a trusted function.
Folder Level JavaScript
Folder level scripts are JavaScript files (.js) that are placed in one of the two Acrobat JavaScript Folders. Acrobat loads and runs these files at start up. At this time, the scripts in these files are given special privileges so they can run any functions and access any properties in the Acrobat DOM. The idea with such a file is that it will preform a series of setup activities such as creating variables, data, functions, and user interface items such as toolbar buttons or menu items. Basically, setting up an automation tool.Automation tools created through a folder level script will be the main focus of the topics in this department. However, nearly all of the topics will also be valid for scripts used in Actions.
IAC, Inter-Application Communication
The IAC is a programming interface that allows Acrobat to be controlled from an external application, usually either Visual Basic or AppleScript. This is a very powerful way to create automation tools that have both total system access and access to all the Acrobat tools. But since this tool is platform dependent and requires the user to have special development tools, it will not be a focus here.
Acrobat Plug-ins
Acrobat plug-ins are written in C++ and are by far the most powerful way to automate Acrobat. They have deep access into the internals of both Acrobat and PDF. They are also platform dependent and difficult to create. The developer requires expert knowledge of Acrobat, the PDF structure, and C++ programming. This topic is currently outside the scope of this web site.
Combination
When the limitations of one automation technique get in the way, any of these methods can be combined with any other to create hybrid solutions. There are also methods that are not mentioned here, such as Acrobat's browser interface, using server-side tools, and 3rd party tools. There are a wide range of possibilities when it comes to creating automation solutions for PDF.
Parts of an Automation Tool
I've been doing this for years and it is extremely rare that the same automation task comes up twice. Everyone has their own way of using Acrobat, and their own unique need for automation, which is why it's a custom programming task. However, automation scripts do share many common characteristics. All scripts require some kind of user interface, i.e., a way to activate the tool and enter any setup parameters. All scripts require access to the same functionality available from the Acrobat menu items and toolbars. And finally, many automation tasks will require access to external resources, such as a database or the internet. These items divide up nicely into two categories-- User Interface and Business Logic.

The articles listed below cover topics directly important to Automation Scripting. Some are generally useful to automation, such as the one on Page Coordinates, and some are on specific automation activities, such as the one one on Importing and Exporting Excel File Data.
|
Exporting a Digital ID to Another Computer Signature, Security, stamp
Digital ID's are typically very private and kept in a single secure location. But, there are workflows where it is necessary to share a Digital ID between several systems. For example, where a small set of users in a closed environment need to be able to decrypt the same documents, or for a single user who uses multiple systems (work station, laptop, etc.). This article covers transferring a Digital ID to another computer. . . .
keep reading
|
Acquiring Raw File Data Thom Parker
External data, i.e., data outside of Acrobat or a PDF file, is often a very important part of a workflow process. For example, information on customers, products, employees, etc. are typically stored in Excel files, databases or on a server. One of the most common issues with automating such a workflow process is getting the data from the external file or data source into the automation script. This article provides techniques and script examples for acquiring external data. . . .
keep reading
|
Creating Acrobat Toolbar Buttons Automation, User Interface
Toolbar buttons are the most important user interface items for activating Acrobat Automation Scripts, but they are also useful in many other ways. This article covers the details of creating toolbar buttons, toolbar button icons, and hooking them into automation scripts. . . .
keep reading
|
Using the Mouse to Automate Stamps Stamps, Automation, Annotations
Capturing and using mouse clicks for an automation script can be awkward to implement. But, it is an ideal solution for many user-driven processes. This article covers the implementation details for using the mouse to place stamps. . . .
keep reading
|
Automating Stamps Stamps, Automation, Annotations
This article covers the details of placing stamp annotations on a PDF page with JavaScript. . . .
keep reading
|
Anatomy of a Stamp File
All of the stamps in Acrobat, built-in or custom, are stored in a set of Stamp Files. When you create a new custom stamp, Acrobat either adds this stamp to one of the existing Stamp Files or creates . . .
keep reading
|
Setting Up an Excel File for Database Access Database, Data Handling, Automation
Relational database access assumes a very specific table structure. The database contains named lists of records (Tables). Each column in a table is named and typed. Excel is not really a databa . . .
keep reading
|
Importing and Exporting Excel Data Automation, Excel, Database, AcroForm
This article explains exactly how to transfer data, in both directions, between an excel file and Acrobat. Scripts are provided for importing and exporting in a variety of scenarios, including a looping scenerio for performing variable data operations and mail merge. . . .
keep reading
|
Using Excel™ with Acrobat™, PDF, and LiveCycle Automation, Data Handling, XFA
There are several different ways Acrobat, PDF, and LiveCycle forms can exchange data with an Excel Spreadsheet. This series of articles outlines the details of the different methodologies and provides several variations on the code for implementing each. . . .
keep reading
|
Common Scripting Elements (Colors, Paths, and Coordinates) Thom Parker
There are a number of scripting elements that are unique to AcroForm scripting and used consistently throughout the Document Object Model. These include Colors, File Paths, and Coordinates. Understanding how these elements are defined and used is a necessary Acrobat scripting skill. . . .
keep reading
|
Using the Search Object
The Acrobat JavaScript Search Object is a scripting interface to Acrobat's search mechanism. It can be used for everything from simple searches on the current document to elaborate multilevel searches involving several documents. . . .
keep reading
|
The Alert Popup Box (UI Controls) Thom Parker
Popup boxes are used for two purposes- to give the user a message and to collect immediate input from the user. In Acrobat JavaScript there are several types of popup boxes . . .
keep reading
|
|
|