Copy link to clipboard
Copied
Hello,
How do I validate a PDF before the person is allowed to print it? I basically want this functionality:
https://www.youtube.com/watch?v=a_i3ZszohnI
Any assistance would be awesome!
I have attached the document I am working on. There is other javascript in there for the drop downs, but I cannot seem to get the ON PRINT validation working.
I am using Adobe Acrobat DC.
Thank you,
Copy link to clipboard
Copied
You have a function with the name "validateFields", but you doesn't use/call the function.
Copy link to clipboard
Copied
Yes! I noticed that and fixed it, thanks! Another question, do you know how to update the javascript so each of the missing fields appear on a new line? Right not the script has them displayed with a comma.
I have attached up the updated working file. Try printing it as soon as you open it and you will see what I mean.
Thanks!
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi Jeffreyg,
Can you please recap what you did to get the script to work? I created a PDF with a print button and with required fields. My fields show the required red outline. I downloaded your PDF, and hit the print button. I got this validation message.
I also saw the comment from Bernd above with a new script. Where did you type in this script for it to appear before printing? (I checked the Actions tab in the buttons property dialog box andI didn't see the script to display this message.) Did you also add Bernd's script to get it to work? Can you please post?
I will also respond to Bernd's posting too. Thanks.
Jonathan
Copy link to clipboard
Copied
Hi Bernd,
I also responded to Jeffrey's post too. I was trying to figure how Jeffrey was able to get the script to work. Here's what I posted afew minutes before:
Hi Jeffreyg,
Can you please recap what you did to get the script to work? I created a PDF with a print button and with required fields. My fields show the required red outline. I downloaded your PDF, and hit the print button. I got this validation message.
I also saw the comment from above with a new script. Where did you type in this script for it to appear before printing? (I checked the Actions tab in the buttons property dialog box and I didn't see the script to display this message.) Did you also add Bernd's script to get it to work? Can you please post?
I made a script that warns people there are fields, but I still allows the person to print the form. I would like to create a form that would prevent the person from printing a form before the required fields are entered.
Thanks,
Jonathan
Copy link to clipboard
Copied
Can you share your PDF file as i cannot download the attached link