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

Date Printed Tag On Every Page

tizz986
Registered: Dec 19 2007
Posts: 4

Hello Everyone, this is my first time posting here.

I have a bit of a strange situation:

I have a user (we are talking about Acrobat 8 Pro) who is in charge of our QA documentation. What she is putting in place is an online (intranet) bank of SOPs for our staff.

The requirements that she has for these documents is that it have a watermark that says that the document expires 24 hours after printing (not hard to do) and a stamp of some kind (watermark/stamp/whatever will work) that says when the document was printed. I have to accomplish all this as something that is embedded into the document due to the users not being able to be trusted to stamp their own documents before they are printed.

Now I came up with this script:

var f = this.getField("Today");
f.value = 'Printed on: ' + util.printd("m/d/yy", new Date());

This script is to populate a text field called Today. It works great in that I have the script run on a "Hidden But Printable" text field in the "Document Will Print" action.

The problem comes when I tried to copy/paste the field "Today" on all of the pages. When I hit print and the script runs it crashes acrobat, which I assume is because it is trying to populate multiple fields with the same name and it dosen't jive well.

Any suggestions?

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Your script should be placed in the 'Will Print" docudment action, this will limit the running of this scrlipt and the setting of the "Today" field's value to one time right before the printing of the PDF. You should then be able to duplicte the "Today" field across all the pages. I just did this with a 298 page PDF.

George Kaiser

tizz986
Registered: Dec 19 2007
Posts: 4
SO when you duplicated the field across all pages, did you duplicate it via copy and paste of the field? or is there a easy way of doing it?