Skip to main content
Participating Frequently
July 23, 2017
Answered

Editing a button after it has been copied to multiple pages

  • July 23, 2017
  • 1 reply
  • 3423 views

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.

This topic has been closed for replies.
Correct answer try67

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.


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.

1 reply

try67
Community Expert
July 23, 2017

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...

TintinATLAuthor
Participating Frequently
July 23, 2017

That is what I had hoped, but it is not working like that. I update one, but the others remain unchanged.

try67
Community Expert
July 24, 2017

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?


The JS Console: https://acrobatusers.com/tutorials/javascript_console