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

How to add a self-updating date in footer of a PDF with Adobe Acrobat Pro DC?

Explorer ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

Greetings,

I have read a lot of different comments across the internet concerning solutions with the self-updating date in the footer area. Unfortunately I was not able to manage to make it work. It seems that the only way to archieve the goal, is the java way. And I have NO idea of java honestly.

So here is the task:

We have PDFs which, when printed, have a tenability of 5 days. So the printing date has to change automatically when opened on every single page.

So how can I archieve this?

Thank you very much for your support & best regards,

Axl

TOPICS
PDF forms

Views

3.0K

Likes

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 06, 2018 Jun 06, 2018

The easiest way of doing it is with a text field. Create such a field and call it "PrintText". Set its visibility to "Hidden but printable" (under the field's Properties, General tab).

Then go to Tools - JavaScript - Set Document Actions and under the Document Will Print event enter this code:

var d = new Date();

d.setDate(d.getDate()+5);

this.getField("PrintText").value = "This document is valid until " + util.printd("mm/dd/yyyy", d);

Save the file and you're done!

Likes

Translate

Translate
Community Expert ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

The easiest way of doing it is with a text field. Create such a field and call it "PrintText". Set its visibility to "Hidden but printable" (under the field's Properties, General tab).

Then go to Tools - JavaScript - Set Document Actions and under the Document Will Print event enter this code:

var d = new Date();

d.setDate(d.getDate()+5);

this.getField("PrintText").value = "This document is valid until " + util.printd("mm/dd/yyyy", d);

Save the file and you're done!

Likes

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
Explorer ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

Hello try67,

thank you for your answer. Will the text field be also able to be put into the footer, so that every single page of the document will have the automatic updated date?

Likes

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 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

LATEST

Forget about the footer.

You can duplicate the text field so that it appears on all the pages of the file, yes. To do so right-click it in Form Edit mode and select Duplicate Across Pages.

Likes

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