Console Errors When Trying to Add Header/Footer

Oct 26, 2018

Copy link to clipboard

Copied

Hi there!

Hoping someone might be able to help explain this to me.. I searched for a while and can't find any similar occurrences.

I just went to add a footer to a document I'm working on (manually - using the "Header & Footer" tool). As soon as the options window came up, the JS console also popped up and started going haywire with errors. Each time I typed a letter or clicked anything on the Header & Footer options window, the console showed another block of the same errors. In all there were over 600 lines of the same errors repeating.

They are all mostly reference errors claiming that several of my document level functions are not defined - when they most definitely are.

Does the Header & Footer tool cause some sort of JS event? And if so, why wouldn't it recognize the functions? I'm super confused here. An example of the errors is below.

Thank you!

ReferenceError: no_zero is not defined

1:Field:Format

TypeError: f is null

1:Document-Level:addToday

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: percent_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: round is not defined

2:Field:Calculate

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: round is not defined

7:Field:Calculate

ReferenceError: round is not defined

5:Field:Calculate

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: percent_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

147

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

Console Errors When Trying to Add Header/Footer

Oct 26, 2018

Copy link to clipboard

Copied

Hi there!

Hoping someone might be able to help explain this to me.. I searched for a while and can't find any similar occurrences.

I just went to add a footer to a document I'm working on (manually - using the "Header & Footer" tool). As soon as the options window came up, the JS console also popped up and started going haywire with errors. Each time I typed a letter or clicked anything on the Header & Footer options window, the console showed another block of the same errors. In all there were over 600 lines of the same errors repeating.

They are all mostly reference errors claiming that several of my document level functions are not defined - when they most definitely are.

Does the Header & Footer tool cause some sort of JS event? And if so, why wouldn't it recognize the functions? I'm super confused here. An example of the errors is below.

Thank you!

ReferenceError: no_zero is not defined

1:Field:Format

TypeError: f is null

1:Document-Level:addToday

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: percent_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: round is not defined

2:Field:Calculate

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: round is not defined

7:Field:Calculate

ReferenceError: round is not defined

5:Field:Calculate

ReferenceError: no_zero is not defined

1:Field:Format

ReferenceError: percent_zero is not defined

1:Field:Format

ReferenceError: no_zero is not defined

TOPICS
Acrobat SDK and JavaScript, Macintosh

Views

148

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
Oct 26, 2018 0
Oct 26, 2018

Copy link to clipboard

Copied

It starts the JavaScript form processing. Do you have any form fields?

The errors are indicating there are missing or misspelled form field names, missing document level functions for rounding,  and what may be a filter applied to an array of values. It would be very helpful if you could post a link to the form, so we could view the form in its entirety.

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
Reply
Loading...
Oct 26, 2018 0
Oct 27, 2018

Copy link to clipboard

Copied

Most of the automation and actions done by Acrobat/Reader are done using JavaScript. All of the tools provided by Adobe in the application folder were one in plain text and consisted of JavaScript statements. If one looks that Adobe JavaScript provided methods, most of the options accessible through the Acrobat menu bar are present in the JavaScript method.

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
Reply
Loading...
Oct 27, 2018 0
Oct 29, 2018

Copy link to clipboard

Copied

Hi there and thanks for your replies! I can share the form but it would have to be privately as it's for work... if you're willing to take a look at it for me, could I send it to you in a private message or email?

The form has lots of form fields, and lots of JavaScript. I am confused as I've never seen these errors pop up when adding a header/footer or using any of the other automation tools provided by Acrobat, and many of my other forms contain similar scripts. I understand what the errors are saying (to a point), but the functions it's saying are "not defined" are defined in document-level scripts and I haven't seen any of these errors in my testing until now.

I'm also starting to think that there might be another problem, as when I opened up the file this morning, it's displaying "0" in all of my calculated fields even though I have a document-level script that is supposed to suppress anything with a value of 0. The second I changed the value of one field, the 0s disappeared.

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
Reply
Loading...
Oct 29, 2018 0