No Scripts Work Acrobat Pro DC (I'm a first-timer)

New Here ,
Jul 13, 2020 Jul 13, 2020

Copy link to clipboard

Copied

First time using Acrobat Pro DC and I have never written in Javascript.

I made a cool form with fields, drop downs, signatures, dates, clear the form button, boxes that autofill numbers using average or sums of numbers from other fields. Everything's working great. But when trying to learn how to write an easy code for doing something a little more custom I find that no codes work at all.

 

I have the Enable Acrobat JavaScript and Enable interactive console boxes checked in Preferences. In the console no scripts operate. Not even something as simple as 3+4. What am I doing wrong? Is there some other security setting or something that I have to turn on or off? 

TOPICS
Acrobat SDK and JavaScript, General troubleshooting, How to, PDF forms

Views

69

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 13, 2020 Jul 13, 2020

Copy link to clipboard

Copied

Can you share another example of the codes that you already tried?

 

Not 3+4.  In Acrobat JavaScript (and with every programming language) there is a syntax and a structure that must be followed.

 

Usually variables are declared first, then you use commands and statements in a variety of ways to achieve something.

 

Another thing, JavaScript arithmetic is handled differently than the arithmetic that us humans can do by hand.

 

Most programming  and scrpting languages follow a logic of true or false. So a 3+4 not necessarily will return 7 as we would expect if the intention was to apply simple sixth grader math, for example.

 

I am curious though, why is it that your Acrobat javascript console is not returning any output as you've indicated.

 

Likes

Translate

Translate

Report

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 ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

Thank you Hero for responding. At the moment I don't have any of the other codes I have tried. I watched a couple of video on Youtube but everytime I did whatever they told me to do (like 3+4) theirs does something and mine does not. I probably missed some detail. I'll keep at it and come back for help.

 

Thank you

 

 

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

Enter 3+4 and press ctrl-enter.

Likes

Translate

Translate

Report

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 ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

It works! How exciting. Entering 3+4 and pressing ctrl-enter produced 7.

So, I guess that means my program's not broken as I supposed? 

Likes

Translate

Translate

Report

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
Adobe Community Professional ,
Jul 14, 2020 Jul 14, 2020

Copy link to clipboard

Copied

LATEST

Your program is not broken.

Likes

Translate

Translate

Report

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