Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Acrobat X Standard Document Level Javascript

New Here ,
Jan 28, 2016 Jan 28, 2016

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

TOPICS
Acrobat SDK and JavaScript , Windows
3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 28, 2016 Jan 28, 2016

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.

Translate
Community Expert ,
Jan 28, 2016 Jan 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");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016

Execute it from the JS Console.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 28, 2016

I guess I’m appearing as a dunce, but where is the JS Console?

I thought I enabled it in the Preferences as in below.

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016

Press Ctrl+J to open it. Paste the code into it, select it with the mouse

and press Ctrl+Enter to run it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 28, 2016

Is there a plug-in I need to install or something? I’ve enabled it in Preferences but nothing happens. I press Ctl+J and still nothing happens.

The Preferences enabling just added it to the Tools list.

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016

No, it's a part of the application. I don't understand what you mean in the last sentences... What was added to the Tools list?

What happens when you press Ctrl+J?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 28, 2016

Thanks for your patience. The Preferences Javascript pic is below and the JavaScript “Tool” appeared afterwards. That pic is next. Ctrl + J does nothing.

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016

To share screenshots you need to post from the forum directly (not via email) and use the Camera icon.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 28, 2016

DocActs.PNGThanks. I'm new to this Adobe forum.

When I enable the Preferences Javascript I see this pic.

JavaPrefs.PNG

The only thing I notice this does is display JavaScript in the Tools list below.

ToolsJava.PNG

Pressing Ctrl+J like I've seen on other blogs does nothing. I cannot bring up any JS Console. Clicking Set Document Actions only opens this pic and doesn't allow any creations.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 28, 2016 Jan 28, 2016

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.

AutoTabScript.PNG

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 28, 2016 Jan 28, 2016
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines