How to Batch Change Stamp IDs in Multiple PDFs using Action Wizard
Question details
The user needs to find a way to replace a specific stamp annotation value with a new one across thousands of PDF files in bulk.

- Product
- Adobe Acrobat Pro
- Device & OS
- not provided
- Scenario
- Batch processing multiple PDF files to automate the replacement of specific stamp annotation IDs or appearances.
- Observed behavior
- The user wants to replace one known stamp annotation value with another across multiple PDFs simultaneously without having to manually edit each file.
Before running any automated batch scripts on your documents, verify the exact internal name (ID) of the stamp you want to target and test the process on a small folder of sample files.
Use Acrobat Action Wizard with Custom JavaScript
Create an automated sequence in Adobe Acrobat Pro that uses JavaScript to identify and update specific stamp annotations across a folder of PDFs.
Because Adobe Acrobat does not have a built-in user interface button to batch swap specific stamp IDs, you must utilize the Action Wizard combined with a custom Acrobat JavaScript. The script will iterate through the annotations of each document, identify the target stamp by its ID, and replace it with the new value.
Write a custom Acrobat JavaScript that loops through 'this.getAnnots()', checks if the annotation type is 'Stamp' and matches your target value, and then updates it with the new stamp appearance or value.
Launch Adobe Acrobat Pro, go to the 'Tools' tab, and select 'Action Wizard' from the Customize section.
Click 'New Action' in the toolbar. Under 'Files to be Processed', click 'Add Folder' and select the directory containing the PDFs you want to modify.
In the 'Choose tools to add' pane, expand 'More Tools', select 'Execute JavaScript', and click the plus (+) icon to add it to the action steps. Uncheck 'Prompt user' so the script runs automatically.
Click 'Specify Settings' on the newly added Execute JavaScript step, paste your prepared custom script into the window, and click 'OK'.
Expand 'Save & Export', add the 'Save' step to your action list, and save the entire action. Finally, click the newly created action in the Action List and select 'Start' to begin the batch process.

Manage PDF Stamps Efficiently with WPS Office
If you need an intuitive way to add, customize, and manage stamps across your documents, WPS Office offers a comprehensive PDF editor. It allows you to easily handle annotations without requiring complex JavaScript programming.
- 1. Open your PDF Document: Launch WPS Office and open the PDF file you wish to annotate using the built-in PDF reader.
- 2. Access the Stamp Tool: Navigate to the 'Comment' tab on the top ribbon and locate the 'Stamp' feature.
- 3. Add or Create a Stamp: Choose from standard pre-made stamps or click 'Click to Add' to import a custom image or text to act as your personalized stamp.
- 4. Apply and Save: Click anywhere on the document to apply the stamp, adjust its size as needed, and go to 'Menu' > 'Save' to retain the changes.

Frequently Asked Questions
Can I batch change stamps in Adobe Acrobat Standard?
No, the Action Wizard feature required to run batch JavaScript operations across multiple files is only available in Adobe Acrobat Pro.
Why does my JavaScript fail to find the stamp?
Stamps often have hidden internal names (IDs) that differ from their display names. You must ensure your script targets the exact internal string (e.g., '#MyCustomStamp') for the replacement to trigger successfully.
Can this batch process run on secured PDF files?
No. If the target PDFs are protected with passwords that restrict editing or commenting, the Action Wizard will not be able to apply the changes. You must remove the security restrictions from the files before running the batch action.
Is it possible to batch delete stamps instead of replacing them?
Yes. You can modify the JavaScript within the Action Wizard to simply call the 'destroy()' method on the annotation when a specific stamp ID is found, effectively deleting it from all processed PDFs.




