How to tell if Print button pressed

How to tell if Print button pressed

I have an HTML form and have enabled the Print and PDF buttons on it.
 
When someone chooses print, I want to set a field with the date that the form was printed.
 
How do I capture the event when someone presses the button?
 
Thanks,
Michele