Skip to main content
Participant
July 14, 2016
Question

Used Javascript in Document Actions to create dynamic watermark to display print date, however it doesn't work in Acrobat Reader, even though Javascript is enabled. Is it because watermarks cannot be created in Reader?

  • July 14, 2016
  • 2 replies
  • 1499 views

Below is the script that I used under "Document Will Print".  when I tested using Adobe Acrobat Pro DC it worked great. When I tested using Adobe Reader XI, the date did not show up, even though JavaScript was enabled.  Any suggestions?

this.addWatermarkFromText({

cText: util.printd('mmm d, yyyy h:MM tt', new Date()),

nHorizAlign: app.constants.align.center,

nVertAlign: app.constants.align.bottom

});

This topic has been closed for replies.

2 replies

try67
Community Expert
Community Expert
July 15, 2016

You should use a text field instead.

On Jul 15, 2016 12:10 AM, "lorraineh58962332" <forums_noreply@adobe.com>

Participant
July 15, 2016

I tried putting a text field into a stamp, however couldn't get it to update the date. Would you happen to know what javascript I should use inside a text field; maybe I had the wrong script.

try67
Community Expert
Community Expert
July 15, 2016

The script would be something like this:

this.getField("PrintDate").value = util.printd('mmm d, yyyy h:MM tt', new Date());

Inspiring
July 15, 2016

That's right, Reader doesn't support that JavaScript method.

Participant
July 15, 2016

Do you have any suggestions as to how to get the "date printed" to show up on a pdf in Reader?