How do I password protect a pdf using javascript? I know it's possible to apply a security policy to a pdf with javascript, but how can I get access to the login username and password?
Asked
Active
Viewed 7,818 times
2
-
Do you want to use [Adobe's PDF usage rights](http://en.wikipedia.org/wiki/Portable_Document_Format#Security_and_signatures) or are you trying to add [HTTP basic auth](http://en.wikipedia.org/wiki/Basic_access_authentication#Example) to your HTTP server, or some custom-database-based-access-controls? – sarnold Feb 28 '12 at 04:13
-
@sarnold I want to use use Adobe's usage rights, but also want to be able to manipulate the username and passwoed – user1190650 Feb 28 '12 at 15:03
1 Answers
1
You can definitely use Javascript to manipulate your .pdf's ... as long as you're using Acrobat Reader. I've used it to do bookmarks; I imagine you can also support username/password operations.
Here's the official documentation:
http://partners.adobe.com/public/developer/pdf/topic_js.html
This link may (or may not) also be applicable:
http://acrobatusers.com/forum/forms-livecycle-designer/protect-field-javascript/

paulsm4
- 114,292
- 17
- 138
- 190