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

Javascript for Print Date/Time stamping

New Here ,
Jun 06, 2018 Jun 06, 2018

Copy link to clipboard

Copied

Is there a Javascript function that will write the date printed date/time stamp into a PDF document when it is printed?

Thanks,

TOPICS
Acrobat SDK and JavaScript , Windows

Views

1.9K

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

I'm not aware of a way of running a script automatically when a file is first created, unless it's done from within Acrobat itself, and even then it's tricky.

Likes

Translate

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

Copy link to clipboard

Copied

I answered a very similar question earlier today: How to add a self-updating date in footer of a PDF with Adobe Acrobat Pro DC?

To add the date to the field change this part of the code:

util.printd("mm/dd/yyyy", d)

To:

util.printd("mm/dd/yyyy HH:MM", d)

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

Copy link to clipboard

Copied

Thanks for your quick response.
I need to embed this in our automated process. We create a Word document and then save it as PDF. At (or around that time) we need to "Call" some function that will automatically open the PDF and write the printing date/time stamp into the PDF, save it and close it. The entire process must be automated. I was hoping there was some API I could call to do that.

Thanks again.

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

Maybe it's something you could do in the Word file, before converting it to a PDF, then.

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

Copy link to clipboard

Copied

That's an interesting thought, but once the Word file is saved as PDF it seems all the "automation intelligence" goes away. If I put a field in the footer, for example, that reflects the print date when printed, then when it is converted to PDF the Date becomes static.

karl

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

I'm not aware of a way of running a script automatically when a file is first created, unless it's done from within Acrobat itself, and even then it's tricky.

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
New Here ,
Jun 07, 2018 Jun 07, 2018

Copy link to clipboard

Copied

LATEST

I think you are right. I talked with our customer about it suggesting that there was no method available that met her described requirements and they responded, "Well, that's OK, we'll just go with the protected Word document with the Print Date field in the footer" (essentially, square one). I'm marking your answer correct but if anyone else discovers this and has any ideas I would still like to know how to do that for the next customer.
Thanks again.

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