I like to create a PDF which when printed out includes the date and time of when it was printed. Because actually changing the PDF content would require a PDF editor I thought using a PDF form (i.e. a PDF which contains a fillable form) where one text field is automatically updated with the current date and time when the PDF is printed. The actual creation of the PDF is not target of this question (the goal is to use pdflatex
which can place JavaScript into PDFs).
I know that PDFs can include JavaScript code, but there are limitation compared to websites. Is it possible, i.e. supported by the Adobe PDF JavaScript API, to have a script which:
- is triggered when the PDF is printed
- can modify a text field or something else which is printed with the normal text
- update this field with the current date/time?