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

Adding a password

ACat299612
Registered: May 31 2011
Posts: 14

I have tried reading the documentation, forums, and other places on how to set security on a pdf, but still have not figured what to do. I thought I would start easy, and just try to add a password to a document, but even that does not seem simple. Am i missing something? Any advice is appreciated.
 
Alan

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Do you want a password that prevents the file from being opened/edited/something else?
At any rate, it's under File - Properties - Security.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

ACat299612
Registered: May 31 2011
Posts: 14
I should have been a little more specific. I want to use Javascript to add security/encryption. Basically the same way the user can do a Advanced - Security - Enhance with Password.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Don't bother. What if someone disabled JS? Then they can just open your file without any problems.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

ACat299612
Registered: May 31 2011
Posts: 14
Let me give an explanation, which i believe will help. I have a pdf that I want to (1) add watermarks to and (2) then encrypt. So, I will be running the javascript program, create a new pdf that is watermarked and has a password, and then distrubitue the file to other people. I have the watermark code working, but now need to add the security portion.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
Sorry, I misunderstood.
If you have a pre-defined security policy then you can use this.encryptUsingPolicy()

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

ACat299612
Registered: May 31 2011
Posts: 14
Sorry for the delay, but i was out of the office. So, I went ahead and created a local security policy because that seemed the easiest. However, after I secure the doc, and watermark it, I can no longer save from within my program. I am using a privelegded saveas function.