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

Set security method to "No security" (allow export, printing etc.)

olegam
Registered: Dec 9 2008
Posts: 4

I need to set the security method of some files to "No security" programatically. I can do this manually, but I would like to do it from code so that I can export the image. I use VB6, but I can call JavaScript methods through that. Please helpm

My Product Information:
Acrobat Standard 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The short answer is No. This cannot be done with Acrobat JavaScript.

To do this sort of thing you would need one of the Adobe PDF servers or a plug-in.

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

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

olegam
Registered: Dec 9 2008
Posts: 4
Is there any way to tell that the pdf has other options than "no security" set? The problem is that my vb6 program hangs because an invisible message box is displayed i Acrobat. But as the user don't see Acrobat and the messagebox, the user cannot dismiss it and the system hangs!
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Yes, the document object has a "securityHandler" property. This property will return null if there is no security on the PDF

if(this.securityHandler != null)
app.alert("This document has security and may require password entry");

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

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