Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dynamic Stamps update date automatically

New Here ,
Oct 25, 2019 Oct 25, 2019

I have tried creating a stamp with the following javascript:

event.value = util.printd("h:MM tt, dd mmm yyyy", new Date);
event.value = (new Date()).toString();
AFDate_FormatEx("H:MM , dd/mm/yyyy");

but it not updating the date and time automatically.

 

I have searched and tried several different versions of the javascript and none of the seam to update the date and time.

 

Any help would be appriciated. 

TOPICS
Acrobat SDK and JavaScript
4.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 25, 2019 Oct 25, 2019

Custom Dynamic Stamps are more than the JavaScript. It is important to create the stamp correctly. You state that the script does not work but you fail to describe what happens and what appears in the JavaScript console..

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 25, 2019 Oct 25, 2019

I followed the guidelines for making a custom dynamic stamp but the java script isn't updating the date automatically the way I need it too

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 26, 2019 Oct 26, 2019
LATEST

So, first, you only need the first line of code. 

 

event.value = util.printd("h:MM tt, dd mmm yyyy", new Date);

 

Next, where did you get your instructions for creating the dynamic stamp?  There are a lot of not so great posts on this forum. 

And Acrobat does not make it easy to create dynamic stamps. For example, you cannot use any of stamp tools in Acrobat, because they will destroy any code you try to place on the stamp. You have to edit the actual stamp file.

Here is an article on just this topic:

https://www.pdfscripting.com/public/Installing-a-PDF-Stamp-into-Acrobat-Macintosh-and-Windows.cfm

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines