PDF Editing Issues

How to Create a Dynamic Acrobat Stamp That Confirms Duplicate Entries

Elise WilliamsElise Williams Nov 3, 2026 869 views

Question details

The user wants to configure a dynamic PDF stamp that requires users to input a filing number or date twice, compares the two entries for a match, and only displays the stamp if the entries are identical.

Create a Dynamic PDF Stamp to Confirm Duplicate Entries
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Creating a custom workflow where accuracy is critical, such as stamping official documents with filing numbers without typographical errors.
Observed behavior
The dynamic stamp needs a verification step utilizing JavaScript to prevent mismatched manual data entry when the stamp is applied.
Before you start

Ensure you have Adobe Acrobat Pro or a PDF editor that supports JavaScript for interactive form fields and dynamic stamps. Basic familiarity with JavaScript is recommended.

Solution 1Recommended

Using Acrobat JavaScript to Verify Duplicate Entries

Add custom JavaScript to your dynamic stamp's calculation event to prompt the user twice, compare the inputs, and output the result if they match.

Dynamic stamps use custom calculation scripts to interact with the user at the exact moment the stamp is applied. By leveraging the app.response() and app.alert() methods, you can build an error-checking mechanism directly into the stamp workflow.

1
Create the Base Stamp Pattern

Design your stamp visually in a new PDF document and add text fields where the filing numbers or dates will appear (e.g., name them 'Number' and 'Number1').

2
Open Stamp JavaScript Properties

Right-click the primary text field, select 'Properties', navigate to the 'Calculate' tab, and choose 'Custom calculation script'.

3
Add the Verification Code

Enter the script to capture input by defining variables. Use code like: var v1 = app.response("Filing Number:"); var v2 = app.response("Confirm Filing Number:");

4
Handle Mismatched and Matched Entries

Write an if statement so that if (v1 != v2) app.alert("Those numbers are not the same!"); triggers an alert. Under the else condition, assign the values: this.getField("Number").value = v1; this.getField("Number1").value = v2;

5
Apply forReal Verification

Wrap your entire script in an if (event.source && event.source.forReal && event.source.stampName == "#MyTestStamp") block. Save the PDF into your Acrobat Stamps folder and test the dynamic stamp.

Using Acrobat JavaScript to Verify Duplicate Entries
Stamp Calculation Event: Always wrap your code in the event.source.forReal block so the prompt doesn't trigger unexpectedly in the background while Acrobat is building or managing the stamps palette.
Advanced PDF Editor

Easily Manage and Apply Custom Stamps with WPS PDF

While advanced JavaScript programming is required for dynamic logic in Acrobat, WPS PDF offers a streamlined, user-friendly interface to create, customize, and apply professional stamps to your documents in seconds.

  1. 1. Open your PDF in WPS Office: Launch WPS Office and open the PDF document you want to stamp.
  2. 2. Navigate to the Comment Tab: Click on the 'Comment' tab on the top ribbon, then select the 'Stamp' tool.
  3. 3. Create a Custom Stamp: Click 'Click to Add', choose whether to add a text stamp or a picture stamp, and design it according to your needs.
  4. 4. Place Your Stamp: Click anywhere on the document to apply your newly created stamp instantly and save the file.
Create custom text and image stamps easily without codingSeamless compatibility with Microsoft Word, Excel, PowerPoint, and standard PDF formatsLightweight, fast, and feature-rich PDF editor for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why does my dynamic stamp prompt me multiple times before I place it?

This occurs if you do not include the event.source.forReal check in your JavaScript. Acrobat evaluates calculation scripts in the background (such as when building the stamp palette interface), which can trigger the prompts prematurely if not blocked.

Can I require the user to enter dates instead of numbers?

Yes, you can easily change the prompt text in app.response() to ask for a date. You can also add regular expressions (Regex) in your JavaScript to validate that the user's input strictly follows a specific date format like MM/DD/YYYY before stamping.

Where do I save my custom dynamic stamp file?

Custom stamps must be saved in the Acrobat Stamps folder. The path is typically located in your user AppData directory under Adobe\Acrobat\[Version]\Stamps. Saving the PDF file directly there registers the custom scripts.

Will dynamic JavaScript stamps work on mobile PDF readers?

Most mobile PDF readers, including the mobile versions of Adobe Acrobat, have limited or no support for complex JavaScript execution like app.response(). Dynamic and interactive stamps are best utilized in fully-featured desktop environments.