Fix Dynamic PDF Stamp Text Not Appearing in Adobe Acrobat
Question details
The user is attempting to create a custom dynamic stamp with a prompt, but the entered text fails to display on the stamp.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Using a custom dynamic PDF stamp that utilizes a JavaScript prompt to ask for user input before placing the stamp on the document.
- Observed behavior
- The prompt appears and accepts the text input successfully, but the text is not placed or displayed within the actual stamp field on the PDF.
Ensure you have access to the JavaScript editor for custom stamps in Adobe Acrobat, and verify that the text fields within your stamp template PDF are properly named and set to 'Read Only'.
Update Stamp JavaScript to Explicitly Assign Field Values
Modify the custom calculation script of the dynamic stamp's text field to ensure the user's input is saved into the correct field variable.
When creating a dynamic stamp, using the app.response method only captures the user input into a temporary variable. You must explicitly assign that response to event.value so Acrobat knows to display it in the stamp's text field.
Open Adobe Acrobat, navigate to Tools > Stamp > Custom Stamps > Manage. Select your custom stamp category and stamp, then choose Edit to open the stamp template PDF.
Activate the 'Prepare Form' tool. Right-click the specific text field intended to display the dynamic text and select 'Properties'.
Go to the 'Calculate' tab in the Text Field Properties window, select 'Custom calculation script', and click the 'Edit' button.
Input the script to capture and assign the value explicitly. For example: var cMsg = app.response('Enter stamp text:', 'Custom Stamp'); event.value = cMsg; event.source.source.info.DocumentState = cMsg;
Click OK to close the editor, save the stamp template PDF file, and then test applying the dynamic stamp on a new, blank PDF document.

Create Custom Text Stamps Easily with WPS Office
Instead of troubleshooting complex JavaScript codes and form fields in Acrobat, you can quickly create custom text and image stamps using the intuitive visual stamp builder in WPS PDF.
- 1. Open Your PDF: Launch WPS Office and open your PDF document.
- 2. Access the Stamp Tool: Navigate to the 'Comment' tab on the top ribbon and click on the 'Stamp' icon.
- 3. Create Custom Stamp: Click on 'Click to Add' or 'Custom Stamp' from the drop-down menu to open the stamp creator.
- 4. Design Your Stamp: Enter your desired text, select dynamic elements like Date/Time, adjust the color and layout visually, and click 'OK' to save.
- 5. Apply to Document: Click anywhere on your document page to instantly apply your newly created custom stamp.

Frequently Asked Questions
Why does my dynamic PDF stamp prompt ask for text twice in Acrobat?
This occurs because Acrobat evaluates the custom calculation script twice: once when generating the stamp preview and once when actually placing it on the page. Wrapping your app.response code in an 'if (event.source.forReal)' block ensures the prompt only appears when physically placing the stamp.
Can I automatically add the current date and time to a dynamic stamp?
Yes. Instead of using a prompt for user input, you can use JavaScript like 'util.printd("mm/dd/yyyy", new Date());' and assign it directly to 'event.value' to automatically generate the current date when the stamp is placed.
Where are custom stamp template files stored on Windows?
Custom stamps in Acrobat are saved as PDF files in the user application data directory. On Windows, this is typically located at C:\Users\[Username]\AppData\Roaming\Adobe\Acrobat\[Version]\Stamps.
Why is the text field on my dynamic stamp completely uneditable?
For dynamic stamps to work correctly, the text field must be set to 'Read Only' in its properties. The custom calculation script fills the field programmatically; if it is not Read Only, user interactions might overwrite or disrupt the JavaScript calculation.




