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

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

4.4K

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!

Votes

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!

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
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?

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

Copy link to clipboard

Copied

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.

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 ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

I have the same issue 'sort of'.  Up until the time that I needed to update the current stamp I was using, I had it formatted so that the current date would appear at the top of an approval stamp each time I used it to approve invoices.  After adding more text to the stamp and saving it in the same way using the Dynamic stamp type.  Yet the only date that shows up is the one of the day in which I edited it and does not change.

Here is the code I was using to accomplish this, which was working fine, unil it didn't:

event.value = util.printd("mmm dd yyyy", new Date);

Thoughts?

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 ,
Jan 17, 2024 Jan 17, 2024

Copy link to clipboard

Copied

LATEST

Stamps can't be updated once applied, even if they contained fields. You must use a stand-alone text field for it.

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