Question

Is it possible to show the date/time of viewing/printing of a PDF document?

I guess it has to involve Adobe Java Script but I'm not entirely sure this is at all possible.

I do have Acrobat X Pro and I can be sure the pdf will be opened with Acrobat Reader 9 or Acrobat reader X.

Embedding some other information would definitively be a plus (like the path the document or the name of the author as it is stored in the PDF properties).

Anyone already did something similar?

Was it helpful?

Solution

Yes, it is possible using Acrobat JavaScript. You create a text field on the page at the location where you want the date/time to appear and set its visibility to HiddenButPrintable. Then add a DocumentBeforePrint action and write the javascript code that sets the field value to current date/time. The action will be executed before the document is printed. This works in Adobe Reader and Acrobat but if you print the document with some tool that does not support JavaScript, the date/time will not appear.
The code for the before print action looks something like this:

getField("yourfield").value = util.printd("yyyy/mm/dd",new Date());
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top