Can somebody help me with applying pdf security inside of Visual Basic code? I learned that function encryptUsingPolicy() does that. The problem is that I know the policy NAME, but the function encryptUsingPolicy() accepts a policy NUMBER. How can I find the policy number by its name? (I 8.0 Professional)
My code is:
Dim gApp As Acrobat.CAcroApp = Nothing
Dim gAVDoc As Acrobat.CAcroAVDoc = Nothing
Dim gPDDoc As Acrobat.CAcroPDDoc = Nothing
If gApp Is Nothing Then
gApp = CreateObject("AcroExch.App")
End If
If gAVDoc Is Nothing Then
gAVDoc = CreateObject("AcroExch.AVDoc")
End If
gPDDoc = gAVDoc.GetPDDoc()
jso = gPDDoc.GetJSObject
‘???????????
jso.encryptUsingPolicy("test2")
…
Thank you
Lana
See in the Acrobar Java Scripting Reference, security object, SecurityPolicy object, and Document.encryptUsingPolicy.
These should guide you for what you need to do in VB.