• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Auto populating a date on a PDF

New Here ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

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

TOPICS
Acrobat SDK and JavaScript

Views

431

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 07, 2018 Jun 07, 2018

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

Votes

Translate

Translate
Community Expert ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines