Auto-update header/footer

New Here ,
Dec 04, 2020

Copy link to clipboard

Copied

Hello, I am creating an Acrobat form for individuals in my office to use. I'm very close to done with it but there is one problem. They will occasionally need to add pages to the document and the footer with page numbers doesn't update. Because this document is being shared with hundereds of people I can't just tell everyone that they have to go to the edit page and then select header/footer and choose update. I was hoping I could make it into a button through Javascript? Is there a way for me to create a button that will open the header/footer menu? I've already tried adding it as an action item from the action wizard and adding it as a custom tool ... but still I can't select it for a button action and I don't see it when scrolling through the javascript menu items. There has to be a simple way to do this, right??

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

Views

13

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

Auto-update header/footer

New Here ,
Dec 04, 2020

Copy link to clipboard

Copied

Hello, I am creating an Acrobat form for individuals in my office to use. I'm very close to done with it but there is one problem. They will occasionally need to add pages to the document and the footer with page numbers doesn't update. Because this document is being shared with hundereds of people I can't just tell everyone that they have to go to the edit page and then select header/footer and choose update. I was hoping I could make it into a button through Javascript? Is there a way for me to create a button that will open the header/footer menu? I've already tried adding it as an action item from the action wizard and adding it as a custom tool ... but still I can't select it for a button action and I don't see it when scrolling through the javascript menu items. There has to be a simple way to do this, right??

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

Views

14

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
Dec 04, 2020 0
try67 LATEST
Most Valuable Participant ,
Dec 05, 2020

Copy link to clipboard

Copied

You can just use a text field with a calculation script, something like this:

event.value = (event.target.page+1);

If you spawn pages make sure to call the calculateNow method afterwards, to update all of these fields.

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...
Dec 05, 2020 0