I have a PDF file with form fill and want the user to secure it when they save it locally after having entered sensitive data. When the user tries to save, I want to check to see if there is a user password on the file (i.e. password to open). There will already be a master password on the file. In the presave event I want to use jscript to check for the existence of a user password. If there is none, I will alert the user that he must set one before saving. I will not save unless there is a password set. How can I check for this?
To get security info on a document use the "doc.securityHandler" property. Look it up in the Acrobat JavaScript Reference, there are example of how to use it.
Thom Parker
WindJack Solutions
[url=http://www.windjack.com]www.windjack.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script