public class PdfEncryptionDetails
extends java.lang.Object
To learn more, visit the Protect or Encrypt a Document documentation article.
| Constructor and Description |
|---|
PdfEncryptionDetails(java.lang.String userPassword,
java.lang.String ownerPassword)
Initializes an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getOwnerPassword()
Specifies the owner password for the encrypted PDF document.
|
int |
getPermissions()
Specifies the operations that are allowed to a user on an encrypted PDF document.
|
java.lang.String |
getUserPassword()
Specifies the user password required for opening the encrypted PDF document.
|
void |
setOwnerPassword(java.lang.String value)
Specifies the owner password for the encrypted PDF document.
|
void |
setPermissions(int value)
Specifies the operations that are allowed to a user on an encrypted PDF document.
|
void |
setUserPassword(java.lang.String value)
Specifies the user password required for opening the encrypted PDF document.
|
public PdfEncryptionDetails(java.lang.String userPassword,
java.lang.String ownerPassword)
public java.lang.String getUserPassword()
The user password will be required to open an encrypted PDF document for viewing. The permissions specified in getPermissions() / setPermissions(int) will be enforced by the reader software.
The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document. The user password cannot be the same as the owner password.
String value.public void setUserPassword(java.lang.String value)
The user password will be required to open an encrypted PDF document for viewing. The permissions specified in getPermissions() / setPermissions(int) will be enforced by the reader software.
The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document. The user password cannot be the same as the owner password.
value - The corresponding String value.public java.lang.String getOwnerPassword()
The owner password allows the user to open an encrypted PDF document without any access restrictions specified in getPermissions() / setPermissions(int).
The owner password cannot be the same as the user password.
String value.public void setOwnerPassword(java.lang.String value)
The owner password allows the user to open an encrypted PDF document without any access restrictions specified in getPermissions() / setPermissions(int).
The owner password cannot be the same as the user password.
value - The corresponding String value.public int getPermissions()
PdfPermissions.DISALLOW_ALL.int value. The returned value is a bitwise combination of PdfPermissions constants.public void setPermissions(int value)
PdfPermissions.DISALLOW_ALL.value - The corresponding int value. The value must be a bitwise combination of PdfPermissions constants.