These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Print Date

gchandra
Registered: Jun 4 2007
Posts: 4

Dear Expert:
 
I want to add the PRINT DATE to the bottom center of selected PDF documents when they are printed only?
 
This is similar to the basic feature in word, which is automatically updated anytime the document is printed. I could not find this feature anywhere in Acrobat.
 
I am new to Acrobat 8.0 Pro and Java Script. Thanks so much for your help.

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
This has to be done with an interactive form field.

1. Add a form field to the PDF at the loctation you want the date to appear.

2. Give the field a name like "PrintDate"

3. Enter a "DidPrint" script to set the actual date
On the Acrobat Menu select
(Advanced -> Document Processing -> Set Document Actions.. )4. On the "Actions" list select "Document Did Print" and then press the "Edit" button.

5. Enter the following script

   this.getField("PrintDate").value = util.printd("dd mmm, yyyy",new Date());
Now the form field will be updated with a date string each time the doc is printed. However, this does not make the date persistent. For that the PDF has to be saved, and the user has to do that. If you want this feature to work when the PDF is displayed in Reader, it will have to be Rights Enabled(i.e. menu item "Advanced -> Enable usage rights in Adobe Reader")

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

gchandra
Registered: Jun 4 2007
Posts: 4
Thanks for your quick reply. It is very much appreciated.
GC
TiffanyAWest
Registered: Aug 6 2008
Posts: 1
I am experiencing an issue. I added the completed the steps provided above. I also added text to the JavaScript to explain the date. However, the text is appearing directly next to the date, with no space (Effective06, Aug 2008). I have tried entering   \t, \n, and other various spaces. None of the options are solutions. Can you help?