Skip to main content
Participant
June 7, 2018
Answered

Auto populating a date on a PDF

  • June 7, 2018
  • 1 reply
  • 619 views

We have been auto populating dates on pdfs for a little over a year.

In the last week these dates have stopped populating todays date, now they just populate Oct 25, 2017.

Here is the calculation we were using.

this.addScript("init", "this.getField(\"general_document_date_today\").value = new Date();");

We need help asap.

Thanks

This topic has been closed for replies.
Correct answer try67

Run that code, ONCE, from the console window in Acrobat, and then it should work.

1 reply

try67
Community Expert
Community Expert
June 7, 2018

This is not a good way of doing it. Why are you using addScript? You only need to run that code once, and then it will work whenever the file is opened. The addScript method is not going to work in Reader, only in Acrobat.

Participant
June 7, 2018

What is the best way to do this?

We are trying to make a form that can be delivered to clients, and when the form is created it will place todays date at the top.

Thank you for your help

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
June 7, 2018

Run that code, ONCE, from the console window in Acrobat, and then it should work.