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

Dynamic Stamps update date automatically

New Here ,
Oct 25, 2019 Oct 25, 2019

Copy link to clipboard

Copied

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

Views

2.6K

Translate

Translate

Report

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

Copy link to clipboard

Copied

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..

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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