Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Delete Multiple Buttons

Contributor ,
Apr 04, 2025 Apr 04, 2025

Hello. I would like to know if there is a way to delete all of the buttons in a document. I'm creating a print version of a digital file so all of the checkmarks and text fields need to be removed. Currently, I can only select one at a time and I have over 80 in the document. I even tried selecting them all on layers on each page, but when I do that, the delete button is greyed out. Is there a way to delete multiple buttons at once?

TOPICS
How to
324
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 04, 2025 Apr 04, 2025

Dave's answer is the correct one, here. It's much faster to delete interactive elements after the fact in Acrobat, because you can multi-select buttons. I don't know what it is about InDesign's incomplete & wonky forms implementation, but you can't select two buttons at once. The only way to affect multiple buttons at once is via scripting, where you'd collect all the buttons and then loop over them, actually the script would still be deleting them one at a time.

 

Worth pointing out here that i

...
Translate
Community Expert ,
Apr 04, 2025 Apr 04, 2025

Why not set them to non-printing (visible but doesn't print)?

In Acrobat Pro, you can select all your buttons and delete or set to non-printing.

image.png

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 04, 2025 Apr 04, 2025

Thanks for your response. I'd like to have them gone in ID so I don't have to re-delete them every time I make an edit and save a new pdf. Changing them to non-printing cannot be done all at once. I'd need to select each one and set it that way one at a time. That would take longer than deleting them. Is there a way to do that as a batch?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2025 Apr 04, 2025

>>>Changing them to non-printing cannot be done all at once.

If you are referring to doing that in Acrobat, yes you can.

 

Also, if your underlying form changes (not the fields or buttons), you can simple replace the page in Acrobat. The form elements will stay. 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2025 Apr 04, 2025

Dave's answer is the correct one, here. It's much faster to delete interactive elements after the fact in Acrobat, because you can multi-select buttons. I don't know what it is about InDesign's incomplete & wonky forms implementation, but you can't select two buttons at once. The only way to affect multiple buttons at once is via scripting, where you'd collect all the buttons and then loop over them, actually the script would still be deleting them one at a time.

 

Worth pointing out here that if you are exporting to PDF from InDesign, then buttons won't export if you choose Print PDF from the file type dropdown when exporting. You'd need to select a specific option ("Appearance Only" in the "Interactive Elements" dropdown of the General section of the Export Adobe PDF dialog) to even see the non-working buttons onscreen in Acrobat.

 

If it's just one INDD document that you want to repurpose for print, Dave's way is the fastest. 

 

If it's something you'd have to do repeatedly, I'm sure I could figure out how to adapt one of my form field scripts to mass delete buttons. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 04, 2025 Apr 04, 2025

If you have a script that could do that, it would help me greatly. This is something I do repeatedly often and would love to be able to select multiple buttons at once. You are correct about exporting to print. After trying it, I realized that the checkmarks don't appear in the final print file even if their default state is set to "on". Thanks for your help.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2025 Apr 04, 2025

@Kathy5FFA 

 

app.activeDocument.buttons.everyItem().remove();

 

https://creativepro.com/how-to-install-scripts-in-indesign/

 

But it will remove ALL buttons from the active document !!!

 

 

But, if you work on Windows and need something with more finesse:

 

RobertatIDTasker_0-1743797544325.png

(link to original thread: https://community.adobe.com/t5/indesign-discussions/audio-in-interactive-pdf/m-p/15251607#M619559)

 

Browsing part - bottom part on the above screenshot - is completely free - but if you would like to be able to remove in bulk only selected - BatchMode - after you filter out / sort - that functionality isn't free.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2025 Apr 04, 2025

You know, Robert, that one-liner will work for simple cases. When bullets are anchored objects, everyItem() won't capture them. I honestly don't know what other conditions might cause buttons to not be caught by everyItem(), but even though it's a fantastically useful method in the right circumstances, I don't trust it, because of the number of times in the last twelve months that I've found that it doesn't actually capture Every Item. 

 

Kathy, if you know that you don't have any anchored buttons, then Robert's one-line script will probably work. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2025 Apr 04, 2025

@Joel Cherney

 

app.activeDocument.buttons.everyItem().remove();

app.activeDocument.groups.everyItem().buttons.everyItem().remove();

app.activeDocument.stories.everyItem().buttons.everyItem().remove();

app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().texts.everyItem().buttons.everyItem().remove();

app.activeDocument.stories.everyItem().groups.everyItem().buttons.everyItem().remove();

app.activeDocument.stories.everyItem().tables.everyItem().cells.everyItem().texts.everyItem().groups.everyItem().buttons.everyItem().remove(); 

 

This should cover everything?

 

But would most likely require some extra try...catch'es - in case groups have only two elements - and one of them is a button.

But then won't process the rest of the groups. So a much longer version - with getElements() and a loop would be required. 

 

 

That's why my IDT is the best solution 😉 because you don't have to be a coder - just know how to use InDesign. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2025 Apr 05, 2025

@Robert at ID-Tasker said: "… But would most likely require some extra try...catch'es - in case groups have only two elements - and one of them is a button."

 

Hi Robert,

well in this case, a group with two objects, and one of them would be removed by scripting, you will end up still with a group object containing only one single object.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2025 Apr 05, 2025
quote

well in this case, a group with two objects, and one of them would be removed by scripting, you will end up still with a group object containing only one single object.

 

By @Laubender

 

Right, forgot about that - there was a discussion about that.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2025 Apr 05, 2025

@Robert at ID-Tasker said: "… This should cover everything"

 

Hm. No. It would not consider buttons in tables that are nested in table text cells.

And it would not consider buttons in MultiStateObjects' states.

 

Regards,
Uwe Laubender
( Adobe Community Expert )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2025 Apr 05, 2025
quote

@Robert at ID-Tasker said: "… This should cover everything"

 

Hm. No. It would not consider buttons in tables that are nested in table text cells.

And it would not consider buttons in MultiStateObjects' states.


By @Laubender

 

Right again 😉

 

And, for some reason - this doesn't work?

 

app.activeDocument.stories.everyItem().texts.everyItem().groups.everyItem().buttons.everyItem().remove();

 

RobertatIDTasker_0-1743863010591.png

 

With or without ".texts.everyItem()"? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2025 Apr 05, 2025
LATEST
quote

[...]

That's why my IDT is the best solution 😉 because you don't have to be a coder - just know how to use InDesign. 

 

Browsing part - free - top three Buttons are part of Groups placed in the first Cell of Tables InLined in another Tables: 

RobertatIDTasker_0-1743864917686.png

It doesn't matter where the object is.

 

Just the Buttons:

RobertatIDTasker_2-1743865391359.png

 

Effect of the BatchProcessing - Task run on all selected objects - paid functionality:

RobertatIDTasker_1-1743864930590.png

 

But even in the free version - it's just a few clicks - to simulate BatchProcessing - without the need to scroll throught the whole document.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines