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

Auto populated date/time printed in footer

New Here ,
Dec 24, 2021 Dec 24, 2021

In Word, there is an option to add a date and time stamp and have it automatically update in the footer the document. I am looking for the similar in Adobe. I see an option to add the date but it doesn't auto update and doesn't have the format I need. I am looking for the footer to say "Printed on DD-MMM-YYYY at HH:MM:SS" (time has to be 24 hour format). There must be some sort of Java script for this but I will need very specific instructions. Please help! 

TOPICS
JavaScript
1.8K
Translate
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 ,
Dec 24, 2021 Dec 24, 2021

Would be able to share a screenshot of the footer in that page?

 

Also, are you asking to have this field to autopopulate with current date as soon as the user opens it?

Translate
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 ,
Dec 25, 2021 Dec 25, 2021

All of our documents are controlled documents, meaning they expire 48 hours after they are printed. What I need is a date and time stamp that auto populates each time the document is printed. It has to auto populate because all other users have read only access. I know it's possible because our old QMS system used to do it but we switched systems and this one does not create that field. 

Translate
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 ,
Dec 25, 2021 Dec 25, 2021

You have to use a script to do it. If you want to use a stamp you will need to delete it when the file is opened and then re-apply a new one, as once stamps are applied their contents can no longer be edited.

Another option is to use something else, like a text field, which can be updated without having to re-apply it. Updating the field's value will also require a script, though.

Translate
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 ,
Dec 25, 2021 Dec 25, 2021

All of our documents are controlled documents, meaning they expire 48 hours after they are printed. What I need is a date and time stamp that auto populates each time the document is printed. It has to auto populate because all other users have read only access. I know it's possible because our old QMS system used to do it but we switched systems and this one does not create that field. 

Translate
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 ,
Dec 25, 2021 Dec 25, 2021

This can be done using a simple (read-only) text field.

Add to at the desired location on the page (let's say it's called "PrintTime") and then go to Tools - JavaScript - Set Document Actions and under the Will Print event add the following code:

 

this.getField("PrintTime").value = "Printed on: " + util.printd("mm/dd/yyyy HH:MM", new Date());

Translate
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 ,
Dec 25, 2021 Dec 25, 2021

Where do I put the script? I would think it would go in the Execute section but I can't type anything in there. If I click on Edit, a little box comes up but there's no Save option and if I just close it then reopen it, the script is gone.

Patti22389680dab1_1-1640440127142.png

 

Translate
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 ,
Dec 25, 2021 Dec 25, 2021

Make the window bigger. There should be an OK button.

Translate
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 ,
Dec 26, 2021 Dec 26, 2021
LATEST

I made it bigger and there still is no OK button. I tried hitting the enter key, does not work either.

Patti22389680dab1_0-1640523950517.png

 

Translate
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 ,
Dec 26, 2021 Dec 26, 2021

You can use the Enter key too.


Acrobate du PDF, InDesigner et Photoshopographe
Translate
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