com.aspose.words
Class PdfEncryptionDetails

java.lang.Object
    extended by com.aspose.words.PdfEncryptionDetails

public class PdfEncryptionDetails 
extends java.lang.Object

Contains details for encrypting and access permissions for a PDF document.

To learn more, visit the https://docs.aspose.com/words/net/protect-or-encrypt-a-document/Protect or Encrypt a Document documentation article.


Constructor Summary
PdfEncryptionDetails(java.lang.String userPassword, java.lang.String ownerPassword)
           Initializes an instance of this class.
 
Property Getters/Setters Summary
java.lang.StringgetOwnerPassword()
voidsetOwnerPassword(java.lang.String value)
           Specifies the owner password for the encrypted PDF document.
intgetPermissions()
voidsetPermissions(int value)
           Specifies the operations that are allowed to a user on an encrypted PDF document. The default value is PdfPermissions.DISALLOW_ALL. The value of the property is PdfPermissions integer constant.
java.lang.StringgetUserPassword()
voidsetUserPassword(java.lang.String value)
           Specifies the user password required for opening the encrypted PDF document.
 

Constructor Detail

PdfEncryptionDetails

public PdfEncryptionDetails(java.lang.String userPassword, java.lang.String ownerPassword)
Initializes an instance of this class.

Property Getters/Setters Detail

getOwnerPassword/setOwnerPassword

public java.lang.String getOwnerPassword() / public void setOwnerPassword(java.lang.String value)
Specifies the owner password for the encrypted PDF document.

The owner password allows the user to open an encrypted PDF document without any access restrictions specified in Permissions.

The owner password cannot be the same as the user password.


getPermissions/setPermissions

public int getPermissions() / public void setPermissions(int value)
Specifies the operations that are allowed to a user on an encrypted PDF document. The default value is PdfPermissions.DISALLOW_ALL. The value of the property is PdfPermissions integer constant.

getUserPassword/setUserPassword

public java.lang.String getUserPassword() / public void setUserPassword(java.lang.String value)
Specifies the user password required for opening the encrypted PDF document.

The user password will be required to open an encrypted PDF document for viewing. The permissions specified in Permissions 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.


See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.