Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Adding a date stamp using Acrobat XI

$
0
0

Hi there

 

I want to add a date stamp to a voucher PDF, so that when it is downloaded and printed out, it displays today's (system) date.

 

I followed the tutorial at: http://tv.adobe.com/watch/acrobat-x-tips-tricks/quick-tip-how-to-add-a -date-stamp-to-a-form/   ,double checked the javascript, and this seemed to work. But when I checked the following day, the date displayed was still set at yesterday's date. It had not moved forward. I tried saving as Reader Extended/Enable More Tools, but that didn't work either and I think it removed the JavaScript altogether.

 

In the original, I went to  Edit All JavaScripts and this is the code that was there:

 

//-------------------------------------------------------------

//-----------------Do not edit the XML tags--------------------

//-------------------------------------------------------------

 

//<Document-Actions>

//<ACRO_source>Document Will Print</ACRO_source>

//<ACRO_script>

/*********** belongs to: Document-Actions:Document Will Print ***********/

var f = this.getField("DatePrinted");

f.hidden = false;

f.value = "Printed on: " + util.printd("mmm dd, yyyy", new Date());

//</ACRO_script>

//</Document-Actions>

 

 

Can anyone please help?


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>