Announcement

Collapse
No announcement yet.

updating date and time when printing

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • updating date and time when printing

    Dear all,

    I inserted a js to show the current date and time in a form field when opening a document. I now wondered if there is a way to update date and time when printing the document so that the print out shows the exact time of printing. Now it prints the time when the document was opened.

    I use the following version: Foxit PhantomPDF 8.2

    js used: var fld = this.getField("Datum");
    fld.value = util.printd("dd.mm.yyyy HH:MM",new Date());

    Thanks for your help!
    Agra

  • #2
    Hi agraciada,

    you could add the time of printing by adding the js with Form -- JavaScript -- Document Actions -- choose Document will print and then click Edit to add the js. The attached is the demo file.

    Attached Files

    Comment


    • #3
      Here is another demo for the function 'show current time and update when printing'. The js is the same. Please click JavaScript -- Document Actions -- --Document will print and JavaScript -- Document JavaScript to find the details.
      Attached Files

      Comment


      • #4
        Hi Doris,

        awesome, that solved my problem!
        Many thanks!!

        Agra

        Comment

        Working...
        X