These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Deleting duplicated buttons in Acrobat X but leave other links intact

editr
Registered: Jan 27 2011
Posts: 7
Answered

We put three buttons at the bottom of a book chapter, which are duplicated across all the pages from the first page. When we do an e-version of the chapter, we then want to delete all the buttons, but leave other links (cross-references) that are in the chapter intact. There is a remove all links feature in Acrobat X, but we don't want to remove ALL links, we just want to remove all BUTTONS.
Is there a way to do this without manually having to select them on hundreds of pages? Basically, we need a way to select all buttons for deleting in one shot.

editr

My Product Information:
Acrobat Pro 10.0, Windows
try67
Online
Expert
Registered: Oct 30 2008
Posts: 2398
Accepted Answer
Run this code from the console:

for (var i=this.numFields-1; i>=0; i--) {
fname = this.getNthFieldName(i);
f = this.getField(fname);
if (f.type=="button") {
this.removeField(fname);
}
}

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

editr
Registered: Jan 27 2011
Posts: 7
This script worked perfectly! I have to admit that I had to contact the author of the reply because I didn't know what "Run this code from the console:" meant. Here's the non-techie translation: With the Acrobat document that you want to remove buttons from open, open the console by pressing Ctrl-J, pasting in the code, selecting it, and pressing Ctrl-Enter. It will run on the currently opened file. Many thanks!

editr