Skip to main content
Participant
Jun 6, 2018 7:21 PM UTC
Answered

Javascript for Print Date/Time stamping

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

Thanks,

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Jun 6, 2018 8:42 PM UTC

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


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.

6 replies

try67
Community Expert
Community Expert
Jun 6, 2018 7:34 PM UTC

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)

Translate
BitsnPCESAuthor
Participant
Jun 6, 2018 7:44 PM UTC

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.

Translate
try67
Community Expert
Community Expert
Jun 6, 2018 7:48 PM UTC

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

Translate