Skip to Content

I have a PDF document that is locked to avoid editing. I have the password, but I want to change the password and permissions.

Estimated Reading Time: 1 Minutes

In order to change permission on a document, you must have a password that permits you to change permissions, and you must open the document with that password.

Call PDDocGetPermissions() to see if you have the authority to change permissions for a document. It will return a PDPerms block which shows the existing permissions. PdPermSecure must be present. If you have the authority to change permissions, you can use the method PDDocSetNewSecurityData() to apply new passwords and permissions.

In order to open a document secured with a password, you would use the Authorization Procedure entry of one of the open calls to define a procedure to supply the password. The Adobe PDF Library provides several sample programs that demonstrate how to open and work with password protected and encrypted PDF documents, including AddPassword, EncryptDocument, and SetUniquePermissions.

 

I have a PDF document that is locked to avoid editing. I have the password, but I want to change the password and permissions.
  • COMMENT