Copy link to clipboard
Copied
I've copied a set of menu buttons across a 600-page PDF. Now I need to change one button to jump to different page. (I did not use destinations… that's another story.)
Is there a way to do this? Or is there a way to delete the button from all pages and then create a new one? The button does have a unique name, but I don't know how to say "find and delete all copies of [name]".
Any help would be much appreciated.
It seems that fields with the same name can still have different actions... Weird.
Anyway, to fix it you can do the following: Delete all fields with the same name using this code:
this.removeField("FieldName");
(Maybe rename the first field, so it's not deleted and you don't need to re-create it)
Then duplicate the newly edited field to the rest of the pages.
Copy link to clipboard
Copied
If the buttons have the same name (which they should, if they are copies of each other and are supposed to do the exact same thing), then there's no need to delete the other copies. Just edit the first one, and the rest will be edited automatically with it...
Copy link to clipboard
Copied
That is what I had hoped, but it is not working like that. I update one, but the others remain unchanged.
Copy link to clipboard
Copied
Do they all have the same name? How did you create/duplicate them?
Copy link to clipboard
Copied
They all have the same name. I created the first one, then used "Duplicate Across Pages." On some pages, I changed the button's icon (under Options), depending on whether I wanted it to appear "selected" or not. I did not change the name, nor the page linked to.
Copy link to clipboard
Copied
It seems that fields with the same name can still have different actions... Weird.
Anyway, to fix it you can do the following: Delete all fields with the same name using this code:
this.removeField("FieldName");
(Maybe rename the first field, so it's not deleted and you don't need to re-create it)
Then duplicate the newly edited field to the rest of the pages.
Copy link to clipboard
Copied
Ah, this sounds very helpful. I am familiar with Javascript but not with using it within Acrobat. Where do I go to enter the code?
Copy link to clipboard
Copied
The JS Console: https://acrobatusers.com/tutorials/javascript_console
Copy link to clipboard
Copied
This worked perfectly! Thank you!!!