org.apache.fop.pdf
Class PDFEncryptionParams
java.lang.Object
org.apache.fop.pdf.PDFEncryptionParams
public class PDFEncryptionParams
extends java.lang.Object
This class holds the parameters for PDF encryption.
PDFEncryptionParams() - Default constructor initializing to default values.
|
PDFEncryptionParams(String userPassword, String ownerPassword, boolean allowPrint, boolean allowCopyContent, boolean allowEditContent, boolean allowEditAnnotations) - Creates a new instance.
|
PDFEncryptionParams
public PDFEncryptionParams()
Default constructor initializing to default values.
PDFEncryptionParams
public PDFEncryptionParams(String userPassword,
String ownerPassword,
boolean allowPrint,
boolean allowCopyContent,
boolean allowEditContent,
boolean allowEditAnnotations)
Creates a new instance.
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 allowed
getOwnerPassword
public String getOwnerPassword()
Returns the owner password.
- the owner password, an empty string if no password applies
getUserPassword
public String getUserPassword()
Returns the user password.
- the user password, an empty string if no password applies
isAllowCopyContent
public boolean isAllowCopyContent()
Indicates whether copying content is allowed.
- true if copying is allowed
isAllowEditAnnotations
public boolean isAllowEditAnnotations()
Indicates whether editing annotations is allowed.
- true is editing annotations is allowed
isAllowEditContent
public boolean isAllowEditContent()
Indicates whether editing content is allowed.
- true if editing content is allowed
isAllowPrint
public boolean isAllowPrint()
Indicates whether printing is allowed.
- true if printing is allowed
setAllowCopyContent
public void setAllowCopyContent(boolean allowCopyContent)
Sets the permission for copying content.
allowCopyContent
- true if copying content is allowed
setAllowEditAnnotations
public void setAllowEditAnnotations(boolean allowEditAnnotations)
Sets the permission for editing annotations.
allowEditAnnotations
- true if editing annotations is allowed
setAllowEditContent
public void setAllowEditContent(boolean allowEditContent)
Sets the permission for editing content.
allowEditContent
- true if editing annotations is allowed
setAllowPrint
public void setAllowPrint(boolean allowPrint)
Sets the persmission for printing.
allowPrint
- true if printing is allowed
setOwnerPassword
public void setOwnerPassword(String ownerPassword)
Sets the owner password.
ownerPassword
- The owner password to set, null or an empty String
if no password is applicable
setUserPassword
public void setUserPassword(String userPassword)
Sets the user password.
userPassword
- The user password to set, null or an empty String
if no password is applicable
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.