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

Adding dynamic date field using Acrobat Pro DC

Community Beginner ,
Mar 14, 2017 Mar 14, 2017

Copy link to clipboard

Copied

Hi,

I have a large number of PDF files.  I would like to add a dynamic date field to each one, so that whenever the PDF file is opened and printed, today's date is printed on the bottom of the PDF file.

From doing some research it seems like you can do this with dynamic stamps.  However the only instructions I have found to do this relate to previous versions of Adobe Acrobat, e.g. Creating a Custom Dynamic Stamp

Can anyone please point me in the right direction to achieve this in Acrobat Pro DC?  I would have thought it would be a simple thing to do, but it doesn't seem so simple.

Many thanks.

TOPICS
Edit and convert PDFs

Views

24.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
Community Expert ,
Mar 14, 2017 Mar 14, 2017

Copy link to clipboard

Copied

You do not want to use a dynamic stamp for this purpose, because a stamp - even though it might add the current date to a document - will not update after it's placed. What you want is a form field that updated when the user prints the file, using the "document will print" action. See here for example for an old question about the same problem: Printing current time and date on a pdf document

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 Beginner ,
Mar 16, 2017 Mar 16, 2017

Copy link to clipboard

Copied

Hi Karl,

Thanks for your response.  You'll have to forgive me but I'm brand new to Acrobat Pro and I am having problems following the instructions on the page.  In the link you sent it says:-

Create a text field and place it in the chosen place on the pdf form. Label it "datebox" in the General tab of Text Field Properties, and apply your character styles in the Appearance tab.

Under the "Advanced" menu, go to "Document Processing" and then "Set Document Actions"

Click on "Document Will Print" and then hit the "Edit" button. In the "JavaScript Editor" paste the following:

var myfield=getField("datebox");

var date=new Date();

date=util.printd("mmm dd yyyy, h:MM tt", date);

myfield.value=date;

Hit OK.

I have created a created a text field, but that's where I got stuck!  How do I get to the text field properties?  I cannot see any way of editing the properties of the text field.

Please help!

Thanks,

Kenton

Screenshot.JPG

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 ,
Mar 16, 2017 Mar 16, 2017

Copy link to clipboard

Copied

This is not a text field, it's real PDF text (I know, this is confusing). You need to create a form field of type text, to do that, you select "Prepare Form" from the pane on the right side. Once in the form editor, click on the text field button on the toolbar:

2017-03-16_13-00-21.png

Then, click on the PDF page where you want this form field to be (or draw out the rectangle for the button). Now you can double-click on the field to bring up it's properties.

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 Beginner ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

Karl,

Thanks again for your response.

OK, we're making progress.  I clicked on prepare form, and now I have created the text field and I can the properties dialogue box.  However, I can't see an "advanced" menu.  On the text field properties dialogue box I can see tabs saying general, appearance, position, options, actions, format, validate and calculate...

Capture 22 03 17.JPG

Can you help?

Thanks again.

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 Beginner ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

Hi Karl,

Please ignore my last post.  My colleague worked out that we could put your text in the custom calculation script field under calculate and that gives him a date:-

Capture 12.49pm.JPG

However, when we open the PDF file the next day or the day after, the date does not refresh.

What do we need to do to make the date refresh to today's date?

I would have thought this was a very common requirement?

Thanks again,

Kenton

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 ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

You need to put the code as a doc-level script, so that it executes each time the file is opened.

You can do that via Tools - Document JavaScripts.

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 ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

LATEST

You are using instructions for Acrobat 9 (or older), which will not work in any newer version of Acrobat. There is no Advanced menu anymore. When you look for tutorials for Acrobat, it's important that you make sure that it's using the same version of Acrobat that you are using - unless you know how different things were moved around on the Acrobat user interface over the years.

In Acrobat DC, the best way to find functionality is by using the Tools search function. There is a search field at the top of the right hand pane, and there is a search field at the top of the Tools page.

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