PDF Editing Issues

How to Automate Custom Stamps with Acrobat JavaScript

John WilsonJohn Wilson Nov 5, 2026 869 views

Question details

The user wants to know if a menu item or folder-level JavaScript can be programmed to automatically trigger a specific custom stamp workflow in Adobe Acrobat.

Can Acrobat JavaScript Automatically Activate a Custom Stamp?
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Developing an automated PDF workflow where users need to apply specific custom stamps without navigating through the standard interface menus.
Observed behavior
Attempting to find a JavaScript command that activates the stamp-selection tool directly, rather than relying on manual user clicks.
Before you start

Acrobat's JavaScript API imposes security restrictions that prevent scripts from directly activating certain user interface tools, including the manual stamp placement cursor. Ensure you have access to Acrobat Pro to create and test folder-level scripts or dynamic stamps.

Solution 1Recommended

Place the Stamp at Predefined Coordinates via Script

While you cannot activate the interactive stamp tool cursor via script, you can use JavaScript to automatically insert a custom stamp at a fixed location on the page.

This workaround programmatically adds an annotation of type 'Stamp' to the document using coordinates. Once the script applies the stamp to the page, the user can manually reposition it.

1
Open JavaScript Console

Navigate to 'Tools' > 'JavaScript' and select 'Document JavaScripts' or open the JavaScript Debugger to input your script.

2
Write the Annotation Script

Use the 'addAnnot' method to create a new stamp annotation. Define the 'type' as 'Stamp', set the 'page' number, and provide the 'rect' coordinates where the stamp should appear.

3
Set the AP (Appearance) Name

Specify the 'AP' property of the annotation to match the internal name of your specific custom stamp so the correct graphic is rendered.

4
Execute and Reposition

Run the script via a custom menu item or button. The stamp will appear at the predefined location, and you can click and drag it to your desired final position.

Place the Stamp at Predefined Coordinates via Script
Finding the Internal Stamp Name: Custom stamps generate unique internal names (often a string of characters). You must find and use this exact internal name in your script for the stamp to display correctly.
Free Microsoft Office alternative

Need a Simpler Way to Manage PDFs and Documents? Try WPS Office

While advanced JavaScript automation in Adobe Acrobat can be highly complex, WPS Office provides a lightweight, intuitive, and highly compatible alternative for everyday PDF editing and Office document tasks. Manage stamps, edit PDF text, and handle formats easily without writing code.

  1. 1. Open your PDF: Launch WPS Office and open your PDF document using the built-in PDF editor.
  2. 2. Access the Stamp Tool: Navigate to the 'Comment' tab on the top ribbon and click on 'Stamp'.
  3. 3. Apply or Create Stamps: Choose from a library of predefined stamps or click 'Click to Add' to import your own custom stamp image instantly.
Free and lightweight PDF editing and annotation toolsFully compatible with standard PDF formats and Microsoft Office filesIntuitive user interface for adding custom stamps, signatures, and commentsAll-in-one suite combining Writer, Spreadsheet, Presentation, and PDF
microsoft office alternative - wps office

Frequently Asked Questions

Why can't JavaScript activate the stamp tool directly in Acrobat?

Acrobat's JavaScript API restricts certain user interface commands for security and operational reasons. Because the stamp tool requires interactive mouse input to determine placement coordinates, a script cannot invoke the tool cursor directly for a specific custom stamp.

What is a dynamic stamp in PDF editing?

A dynamic stamp is a special custom stamp that contains embedded JavaScript. When placed on a document, this script automatically runs to update elements like the current date and time, or it can open a dialog box asking the user to enter custom text that will appear on the stamp.

How do I move a stamp that was placed by a script?

Once a script inserts a stamp at a predefined location on your page, it behaves like any standard annotation. You can simply select it with your mouse and drag it to any other location on the document.

Can I add a custom stamp without using any programming code?

Yes. You can easily add custom stamps manually by navigating to the Stamp tool menu, selecting 'Custom Stamps', and uploading an image or PDF. You only need JavaScript if you want to automate the data inside the stamp or control its automatic placement.