PDF Automation Station

PDF Automation Station

Document Level Scripts

A Common Question

David Dagley's avatar
David Dagley
Jun 22, 2024
∙ Paid
1
1
Share
a close up of a text description on a computer screen
Photo by Yancy Min on Unsplash

When I started learning JavaScript for Adobe Acrobat Pro more than 20 years ago, and using it to program fillable forms and paperwork automation solutions, I was frequently led to the same place: The JavaScript forum at AcrobatUsers.com. Solutions and sample scripts were shared freely by true professionals, and masters of their craft.

It wasn’t long before I started answering questions myself and quickly moved into the expert rank. I got really busy with my business and the Acrobat Users website changed something procedurally in a negative way - I can’t even remember what it was - so I stopped answering questions. I recently started answering questions again.

A lot of answers start with "Create a document level script…" and it’s not long before the inevitable follow-up question "where does the document level script go?" surfaces. So here we go.

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


Acrobat JavaScript Locations

There are several locations to insert and run JavaScript:

  • The JavaScript console: runs immediately when executed from the console.

  • The Action Wizard (formerly "Batch Process"): runs when an action runs.

  • Folder level script: runs every time the Acrobat program starts.

  • Document level script: runs every time a PDF opens.

  • Page action: runs when the user enters or exits a PDF page.

  • Document action: runs during one of the following events: before the user saves the document, after the user saves the document, before the user prints the document, after the user prints the document.

  • Form field: runs when user interacts with the form field, or when the value of another field changes.

This post is for paid subscribers

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