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

Document level javascripts in Adobe Reader

New Here ,
Oct 20, 2016 Oct 20, 2016

I'm new to Adobe and form editing. I've created an interactive PDF form on Adobe Acrobat DC with a custom autotabbing javascript. The autotabbing works in preview but when I open the same PDF in Adobe Reader DC, the autotabbing doesn't work, I get the following message ReferenceError: tab_next is not defined 1:Field:Keystroke.

tab_next is a function stored in the document level javascripts.

Any javascript added directly to a textbox or to any form field will work. But Adobe Reader doesn't appear to recognize\execute the document level javascripts. Any ideas on what I'm doing wrong?

TOPICS
Acrobat SDK and JavaScript , Windows
1.2K
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 ,
Oct 20, 2016 Oct 20, 2016

Did you install your .js file in Reader's JavaScripts folder as well?

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 ,
Oct 20, 2016 Oct 20, 2016

Thanks try67, I haven't done anything like that. I'm very new to this, so I don't even know how to install the .js file to the reader folder.

I assumed that the functions would be stored as part of the PDF (along with the form and the inline javascript). But I make a lot of crazy assumptions.

This PDF form will be used by a number of people across different locations, would the javascript file have to be installed on their pc's also??

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 ,
Oct 20, 2016 Oct 20, 2016

Sorry, I thought you were talking about a folder-level script... A

document-level script does not need to be installed locally.

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 ,
Oct 20, 2016 Oct 20, 2016

Thanks try67.

I'm looking at this issue a bit more and it appears that my autotabbling script is using built-in functions called AFNumber_Keystroke and AFMergeChange.

it appears to be these functions that Adobe Reader DC has a problem with. if I use these built-in functions in any script in my PDF document, they will not work in reader. But they will work in Adobe Acrobat DC.

All other javascripts work in both reader and acrobat.

Does this make any sense to anyone?

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 ,
Oct 20, 2016 Oct 20, 2016

These are built-in functions that should exist in Reader. Without them the

form fields in the file are not likely to work correctly.

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
LEGEND ,
Oct 20, 2016 Oct 20, 2016

Could you post a link to the file or a sample file with this issue.

It might be possible to use the "Comb" option and have one field rather than having all theses individual form fields.

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 ,
Oct 28, 2016 Oct 28, 2016

Thanks gkaiseril, I might just do that. I can see the comb field now and it would work for what I need.
I still have a problem using the built-in functions. but thanks a mill for the help. I appreciate 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
Community Expert ,
Oct 28, 2016 Oct 28, 2016
LATEST

The built-in functions works in Acrobat Reader DC:

http://www.planetpdf.com/codecuts/pdfs/JSAutoTab.pdf

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