Copy link to clipboard
Copied
Hello
I have tried googling with no luck and really need some help.
I need to add 'Date printed dd/mm/yy' to my PDF docs. I have tried to enter a script I have found on line within the calculation of a 'form' but all this does is create the current date and not the actual date the doc was printed. Should I be adding something in to the actions/javascript instead? I need to text to show on the document too and not just hidden until printed.
Thanks in advance
Copy link to clipboard
Copied
You must add the code to "Document Will Print" in the document actions.
Copy link to clipboard
Copied
Hi
Thanks, do I add this in the calculation section of the form or do I add this in the javascript?7
Thanks
Copy link to clipboard
Copied
At document actions you can only add JavaScript code:
Copy link to clipboard
Copied
Brill thank you, I have now found it. Would you know the best script to write. I literally just want 'date of print dd/mm/yy' but those I have found on the internet are not working for me. Also would this create a form field? I ideally need it to so I can move it to a particular part of the document.
Thanks
Copy link to clipboard
Copied
Create a form field and set the value of the field.
Copy link to clipboard
Copied
It's better to create the field in advance and place it at the location where you want the text to appear. Set its display property to "Printable, but hidden". Then enter this code into the Will Print event you found (let's say the field's name is "PrintDate"):
this.getField("PrintDate").value = "Date of print: " + util.printd("dd/mm/yy", new Date());
Copy link to clipboard
Copied
thank you this is very helpful. I shall try now. Is there a way of making the date visible within the form field and not just when printed? I'm guessing I would need to add something to the script?
Thanks
Copy link to clipboard
Copied
Sorry.. also.. I have tried to print and the form box is blank. Should I be adding something within the form also?
Thank you
Copy link to clipboard
Copied
Sorry.. me again. I've had a play around and got used to the form/java script and your suggestions have worked. Thank you so much for you help you are amazing.
Copy link to clipboard
Copied
If you want to make it visible the whole time just set the display property
of the field to Visible.
On Fri, Mar 31, 2017 at 1:52 PM, valeriew68304081 <forums_noreply@adobe.com>