Skip to main content
Participating Frequently
January 10, 2023
Answered

Date in dynamic stamp not updating to reflect current date/time

  • January 10, 2023
  • 1 reply
  • 2078 views

I need to create a simple dynamic stamp with a date/time field, which the user will use to indicate when a document was filed. The rest of the stamp is simple text, just their name and other identifying information. I created one according to the directions here:

 

https://helpx.adobe.com/acrobat/kb/create-custom-dynamicstamp.html

 

At first the stamp worked as expected for a few weeks/months, and then suddenly stopped working inexplicably. I have since created a new stamp, but using the following Javascript code instead:

 

event.value = util.printd("mmm dd yyyy h:MMtt", new Date());
console.println("Dynamic stamp calculation script");

 

Unfortunately it still does not work, and I am unable to determine why.

This topic has been closed for replies.
Correct answer Thom Parker

I did the following:

 

Text Field Properties > Calculate tab > Checked Custom calculation script > Clicked edit > Added the code > Clicked OK > Clicked Close


I suspect one of two issue

1) the stamp name is not prefixed with "#" symbol

   Here's a video on finding the stamp name:

    https://www.pdfscripting.com/public/images/Video/FindingStampName.cfm

 

2) You used the Acrobat stamp tools to somhow re-add the stamp to Acrobat, thus completely destroying the dynamic nature of the stamp. I strongly suggest you read the article I linked in the previous post.

 

If you post the stamp file we can take a look at what's going on.

 

 

 

1 reply

Thom Parker
Community Expert
Community Expert
January 10, 2023

What exactly is the failure?  Is the date field blank? or does it show the wrong date? wrong time?

What is the name of this stamp? Is it prefixed with "#"?  If not then the script will only run once. 

 

Here is a vastly superior article on creating a dynamic stamp.

https://acrobatusers.com/tutorials/dynamic_stamp_secrets/

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
PDFNoviceAuthor
Participating Frequently
January 10, 2023

I can see the date/time field, but it's displaying the date of creation, not the date I affixed the stamp to the document.

try67
Community Expert
Community Expert
January 10, 2023

Where did you place the code?