Did you print the PDF and observed what happened.
The video is about putting the date printed in the PDF just before the PDF is sent to the printer.
I would have coded it as follows:
var f = this.getField("DatePrinted"); // field object
f.display = display.noView; // only print the field
f.value = "Printed on: " + util.printd("mmm dd, yyyy", new Date()); // set the value of the field
The 'hidden" property of the field is an old method and discouraged along with the 'print' property. Both of these can be manipulated with the "display" property.
The "Will print" action only occurs when a print action is initiated
Do you want this to change when the PDF is opened? Then you need to create a page open or document level script.
That's great, thanks
The document opens and displays the old date, but when I print the document, the date disappears onscreen and today's date prints.
This will get me out of trouble for now.
But can I hide the (old) date onscreen? Where is the "display" property in Acrobat Pro?
Thanks for your help.
Edit the form, select the field, open the properties for the field and on the "General" tab there is the "Common Properties" section and the "Form Field:" option. Select "Hidden but printable" and the field will only be printed not displayed. This is same as "display.notVisible". I would also make the field Read Only.
Fantastic. It works!
Thanks for your time
Is there anyway to get that into a footer so it would print on every page?
Is this what you want?
If you need a dynamic "footer" that only prints then you need to add a field to every page and setup a script to update that field before printing.
I found a "duplicate across pages..." by right clicking the text field that will place the text field on every page.