These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Password Protection using VB Javascript

Rajeshj
Registered: Jul 11 2007
Posts: 4

Is there any VB JavaScript code to check whether a PDF is password protected or not. Any version is fine. Pls. reply

My Product Information:
Acrobat Standard 6.0.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Why Yes there is. If a PDF has been encrypted using any method it has a security handler associated with it.

You can access the name of the security handler with

this.securityHandler

For no encryption this parameter will be "null".
For password encryption it will be "Standard"

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script