public class PDFEncryptionParams
extends java.lang.Object
Constructor and Description |
---|
PDFEncryptionParams()
Default constructor initializing to default values.
|
PDFEncryptionParams(java.lang.String userPassword,
java.lang.String ownerPassword,
boolean allowPrint,
boolean allowCopyContent,
boolean allowEditContent,
boolean allowEditAnnotations)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getOwnerPassword()
Returns the owner password.
|
java.lang.String |
getUserPassword()
Returns the user password.
|
boolean |
isAllowCopyContent()
Indicates whether copying content is allowed.
|
boolean |
isAllowEditAnnotations()
Indicates whether editing annotations is allowed.
|
boolean |
isAllowEditContent()
Indicates whether editing content is allowed.
|
boolean |
isAllowPrint()
Indicates whether printing is allowed.
|
void |
setAllowCopyContent(boolean allowCopyContent)
Sets the permission for copying content.
|
void |
setAllowEditAnnotations(boolean allowEditAnnotations)
Sets the permission for editing annotations.
|
void |
setAllowEditContent(boolean allowEditContent)
Sets the permission for editing content.
|
void |
setAllowPrint(boolean allowPrint)
Sets the persmission for printing.
|
void |
setOwnerPassword(java.lang.String ownerPassword)
Sets the owner password.
|
void |
setUserPassword(java.lang.String userPassword)
Sets the user password.
|
public PDFEncryptionParams(java.lang.String userPassword, java.lang.String ownerPassword, boolean allowPrint, boolean allowCopyContent, boolean allowEditContent, boolean allowEditAnnotations)
userPassword
- the user passwordownerPassword
- the owner passwordallowPrint
- true if printing is allowedallowCopyContent
- true if copying content is allowedallowEditContent
- true if editing content is allowedallowEditAnnotations
- true if editing annotations is allowedpublic PDFEncryptionParams()
public boolean isAllowCopyContent()
public boolean isAllowEditAnnotations()
public boolean isAllowEditContent()
public boolean isAllowPrint()
public java.lang.String getOwnerPassword()
public java.lang.String getUserPassword()
public void setAllowCopyContent(boolean allowCopyContent)
allowCopyContent
- true if copying content is allowedpublic void setAllowEditAnnotations(boolean allowEditAnnotations)
allowEditAnnotations
- true if editing annotations is allowedpublic void setAllowEditContent(boolean allowEditContent)
allowEditContent
- true if editing annotations is allowedpublic void setAllowPrint(boolean allowPrint)
allowPrint
- true if printing is allowedpublic void setOwnerPassword(java.lang.String ownerPassword)
ownerPassword
- The owner password to set, null or an empty String
if no password is applicablepublic void setUserPassword(java.lang.String userPassword)
userPassword
- The user password to set, null or an empty String
if no password is applicableCopyright 1999-2010 The Apache Software Foundation. All Rights Reserved.