1 Reply Latest reply on Nov 29, 2012 1:22 PM by gkaiseril

    I am attempting to use a dynamic date that prints on document, but its not updating


      I am attempting to insert the current date printed on a document, but its not updating.  Everytime we go back to it, it is still the date that I originally inserted the date code to print.  I have found numerous discussions on this issue and have followed the suggestions to no avail.  The suggestions always work to produce the date when I am inserting the script, but it never updates.  I have tried many variations that I have found in discussions on this forum such as:


      event.value = "THIS DOCUMENT PRINTED ON " + util.printd("dd-mmm-yyyy", new Date());




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

      f.hidden = false;

      var d = new Date();

      var year = d.getYear()+1900;

      f.value = "THIS DOCUMENT PRINTED ON " + (d.getMonth()+1) + "/" + d.getDate() + "/" + year;


      OR one of these just two scripts to simply create the date with no surronding text



      event.value = util.printd("dd-mmm-yyyy", new Date());



      util.printd("dd-mmm-yyyy", new Date());



      Also the script from this post:http://forums.adobe.com/thread/734547





      All of these ideas worked to produce the date, but it never updates when I open the document in the future.  Any insite into why it is not updateing would be appreciated.


        • 1. Re: I am attempting to use a dynamic date that prints on document, but its not updating
          gkaiseril MVP & Adobe Community Professional

          A lot will depend upon where you put the script.


          Document level script - script updates, runs, when PDF is opened and not again.

          Custom Calculation script - script updates, runs, when any field used in a calculation is updated.

          Page Open action - script updates, runs,when the page is opened or navigated to.

          Button Up/Down action - script updates, runs, when the button is release or depressed.

          Will Print action - script updates, runs, before the PDF is printed.


          Did you carefully read the post and the replies?


          I posted to put the script in the "Document Level Will Print".


          When exactly do you want the script to run or update the field?