Placing Current Date Into A Text Field Of A Pdf Form Using Javascript
Solution 1:
Yes, it is possible. The PDF documents support a WillPrint action that is executed before the document is printed. You set this action with a javascript action that retrieves the current date and time and sets a field value with this date.
The thing is that not all PDF viewers support Acrobat javascript code so the WillPrint action might not be executed.
Solution 2:
After seeing this post, I wrote an article for our PDF product - Creating Print-Only PDF Content - to show that this is indeed possible. What I have done is create a form field that is hidden on the screen but available when printed. I then added a JavaScript PDF action to the "before print" event of the document so that the form field value was set to the current date and time.
DISCLAIMER: I work for Gnostice.
Post a Comment for "Placing Current Date Into A Text Field Of A Pdf Form Using Javascript"