Other PDF Issues

Remove PDF Attachments From Multiple Files With Acrobat Action Wizard

Elise WilliamsElise Williams Nov 19, 2026 868 views

Question details

Remove attachments from a large collection of PDFs automatically rather than editing each file individually.

Remove PDF Attachments From Multiple Files With Acrobat Action Wizard
Product
Adobe Acrobat Pro
Device & OS
not provided
Scenario
A PDF library needs to be processed in bulk so attachments do not interfere with indexing.
Observed behavior
The PDFs contain attachments that make indexing inconvenient, and removing them one at a time would be time-consuming.
Before you start

Check that your Acrobat edition includes Action Wizard and that the PDFs can be modified. Test the action on copies of a few representative files, including one with multiple attachments, before processing the full library.

Solution 1Recommended

Run an Acrobat Action to remove document-level attachments

Use Action Wizard to apply a JavaScript removal step to PDFs in a folder.

This script removes document-level embedded files. It does not necessarily remove attachments added as page annotations, and it may not work on protected PDFs that prohibit changes.

1
Create an action

In Acrobat Pro, open All tools or Tools, select Action Wizard, and choose New Action. Menu names can vary by Acrobat version.

2
Add a JavaScript step

Under More Tools, add Execute JavaScript to the action. Select Specify Settings and enter: while (this.dataObjects && this.dataObjects.length) { this.removeDataObject(this.dataObjects[0].name); }

3
Configure output

Add or configure the Save step in the action, choose an output location and naming behavior, and save the action with a descriptive name.

4
Run a small test

Select the saved action in Action Wizard, add a folder containing test copies, and click Start. Open the resulting PDFs and check the Attachments panel to confirm the document-level attachments are gone.

5
Process the library

Once the test results are correct, run the action again and select the folder containing the PDFs to process. Review any errors and confirm the output files before reindexing.

Run an Acrobat Action to remove document-level attachments
Attachment removal is permanent: The saved output no longer contains the removed attachments. If a file is protected or uses attachment annotations, it may require a different approach.
Free Microsoft Office alternative

Review PDF files and Office documents with WPS Office

WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move between existing documents and PDFs. It does not replace Acrobat Action Wizard for this bulk attachment-removal workflow.

Open and review PDFs alongside other office documentsCompatible with Microsoft Word, Excel, and PowerPoint formatsFree, lightweight software with a familiar interfaceUse existing Office files without a complex migration
microsoft office alternative - wps office

Frequently Asked Questions

Can Acrobat process an entire folder of PDFs?

Yes. In Acrobat Pro, open Action Wizard, select your saved action, and add a folder before clicking Start. Check the action's save settings before running it.

Will this script remove every kind of PDF attachment?

It targets document-level embedded files exposed through Acrobat's dataObjects collection. Attachments added as page annotations may need separate handling.

Can I run the action on password-protected PDFs?

The PDFs must permit the changes. Open a representative file in Acrobat and check its security settings; restricted files may need to be unlocked or processed with appropriate permissions first.

How can I check that the attachments were removed?

Open a processed PDF in Acrobat and inspect its Attachments panel. Test files with multiple attachments and review any Action Wizard errors before processing the full library.