Skip to main content
Participating Frequently
January 28, 2016
Answered

Adobe Acrobat X Standard Document Level Javascript

  • January 28, 2016
  • 1 reply
  • 3497 views

How do I create a document level javascript in Acrobat X? I'm trying to work with forms in my PDF files.

This topic has been closed for replies.
Correct answer try67

Thank you for your assistance!

Okay I found out how to launch the JS Console (debugger). Using this syntax to create the javascript,

this.addScript("ScriptName", "app.alert(\"Hello\"); // script code goes here as a string");

how do I insert this Document Level script (lines 1. through 7.) in it? I know how to set up the bottom part.


You need to convert the function into a string and then execute the code I provided with it as the second parameter.

By the way, you should consider upgrading to Acrobat Pro, where applying doc-level scripts is much easier.

1 reply

try67
Community Expert
Community Expert
January 28, 2016

It can only be done using a script, like this:

this.addScript("ScriptName", "app.alert(\"Hello\"); // script code goes here as a string");

CitrusGuyAuthor
Participating Frequently
January 28, 2016

Thanks but I’m not sure where to enter that script you suggested. I’m setting up auto tab and have a script to enter in a Document Level JavaScript.

Where do I enter your script?

Mark Bratcher

Consolidated Citrus, LP

3602 Colonial Court

Fort Myers, FL 33913

(239) 275-4060 ext 219

This e-mail is intended for the sole use of the individual(s) to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. You are hereby notified that any dissemination, duplication, or distribution of this email and any files transmitted with it are confidential and intended solely for the individual or entity to which they are addressed. Any unauthorized use, disclosure or distribution of this e-mail and its attachments is prohibited. If you have received this email in error, destroy it immediately.

All emails sent from or to an addressee of King Ranch, Inc. or one of its subsidiaries shall remain the property of King Ranch, Inc.

King Ranch and the Running W logo are both registered trademarks in the United States.

try67
Community Expert
Community Expert
January 28, 2016

Execute it from the JS Console.