In this tutorial, learn how to insert date stamps to fillable PDF forms that will only appear when an end user prints your PDF form using Acrobat X or XI. When designing a form in Acrobat X or XI Std. or Pro., there may be times when you want to know the date that a user completes or prints a form.
This is a simple two-step process that starts by clicking the Tools Pane, Forms panel, and selecting the Edit command. We'll begin by adding a New Text Field to hold the actual date. And give it a name. In this example, I’ll call mine DatePrinted. In the Properties dialog select Hidden from the Common Properties and check the Read Only box. Now we're going to exit Form Editing mode.
var f = this.getField("DatePrinted"); f.hidden = false; f.value = "Printed on: " + util.printd("mmm dd, yyyy", new Date());
In this simple three line script, we first assign variable f to the field where we are adding a new date. And then in the second line we show the field since it's initially hidden and then in the third we add the actual date. Now to test out this functionality, I’m going to go ahead and print my form to PDF and then view the resulting file. Here you can see our read-only date stamp, printed on a new document.
|Acrobat XIAcrobat X|
|Convert existing forms to fillable PDFs, fill and sign any form|