Copy link to clipboard
Copied
I have a script that will extract pages from a document, apply an existing security policy (to password protect the document from changes) and save them. This all works well, however Adobe still keeps coming up with the Password Security - Settings dialog window for each file. Can someone recommend a way to automatically do this without the window opening, either in the Javascript or in the policy.
I am using Pro XI,
Thanks in advance.
Jeff
Copy link to clipboard
Copied
Can you post the relevant code that you're currently using?
Copy link to clipboard
Copied
The relevant piece of code just applies the policy from my Adobe policies - this is working fine, however the policy will invoke the Adobe dialog:
| var rtn = Currpage.encryptUsingPolicy({oPolicy: oMyPolicy }) | |
Copy link to clipboard
Copied
How did you define the oPolicy parameter?
On Tue, May 24, 2016 at 5:52 PM, jeffreyb93219864 <forums_noreply@adobe.com>
Copy link to clipboard
Copied
The policy was created in Adobe (Tools->Protection->Encrypt->Manage security policies->New
The code then cycles through the polices until it matches the name "MyCerts":
var sPolicyName = "MyCerts";
app.beginPriv();
var AllPolicies = security.getSecurityPolicies();
for(var i=0; i<AllPolicies.length; i++)
{
if(AllPolicies.name == sPolicyName)
{
oMyPolicy = AllPolicies;
break;
}
}
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more