Encrypt, Decrypt and set Privileges on PDF documents
Contents
[
Hide
]
Set Privileges on an Existing PDF File
In order to set privileges on an existing PDF document, you can use Document->Encrypt(…) method, which takes DocumentPrivilege object. A DocumentPrivilege class is used to set different privileges to access PDF document. Furthermore, there are 4 following ways using this class:
- Using predefined privilege directly.
- Based on a predefined privilege and change some specific permissions.
- Based on a predefined privilege and change some specific Adobe Professional permissions combination.
- Mixes the way 2 and way 3.
Following code snippet will demonstrate above 4 ways to set document privileges: