user_pwd will not be
able to modify the document.
AccessPermission ap = new AccessPermission(); ap.setCanModify(false); StandardProtectionPolicy policy = new StandardProtectionPolicy(owner_pwd, user_pwd, ap); doc.protect(policy);
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private AccessPermission | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | StandardProtectionPolicy(String
The owner password. ownerPassword, String The user password. userPassword, AccessPermission The access permissions given to the user. permissions)Creates an new instance of the standard protection policy in order to protect a PDF document with passwords. |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public AccessPermission | |
| public String | |
| public void | |
| public void | |
| public void |
| ownerPassword | back to summary |
|---|---|
private String ownerPassword
| |
| permissions | back to summary |
|---|---|
| private AccessPermission permissions | |
| userPassword | back to summary |
|---|---|
private String userPassword
| |
| StandardProtectionPolicy | back to summary |
|---|---|
| public StandardProtectionPolicy(String ownerPassword, String userPassword, AccessPermission permissions) Creates an new instance of the standard protection policy in order to protect a PDF document with passwords.
| |
| getOwnerPassword | back to summary |
|---|---|
| public String getOwnerPassword() Returns the owner password.
| |
| getPermissions | back to summary |
|---|---|
| public AccessPermission getPermissions() Returns the access permissions
| |
| getUserPassword | back to summary |
|---|---|
| public String getUserPassword() Returns the user password.
| |
| setOwnerPassword | back to summary |
|---|---|
| public void setOwnerPassword(String ownerPassword) Sets the owner password
| |
| setPermissions | back to summary |
|---|---|
| public void setPermissions(AccessPermission permissions) Sets the access permissions
| |
| setUserPassword | back to summary |
|---|---|
| public void setUserPassword(String userPassword) Sets the user password.
| |