Copy link to clipboard
Copied
Hi,
I am having an issue with using Javascript on Acrobat Pro to display the date and time that the document was printed. The Javascript code that I am using is:
this.getField("PrintDate").value = "Printed on: " + util.printd("mmm d, yyyy hh:MM tt", new Date());
When I use this code on the "Will save" action, the time prints correctly in a 12-h format with the am/pm. However, when I use the same code on the "Will print" action, the 'tt' become a 'P' no matter if it is morning or afternoon. I have attached a document containing the output that I get from my code when I save the file, then print it using Google chrome. Does anyone know why the code is not working for the "Will print" action?
Thank you in advance
Marie
Report the issue to the developers of the Chrome PDF plugin.
Copy link to clipboard
Copied
What happens when you print the file with Acrobat Reader or Adobe Acrobat?
Copy link to clipboard
Copied
It works fine. I tried to print the file with different browsers and it didn't work, so I'm assuming the issue is with the browsers. Thank you.
Copy link to clipboard
Copied
Report the issue to the developers of the Chrome PDF plugin.
Copy link to clipboard
Copied
I attempted this on various browsers and got the same result so I think the issue is present on most browsers. Thank you for the advice, I will contact them.