public class PDStandardEncryption extends PDEncryptionDictionary
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PERMISSIONS
Deprecated.
The default set of permissions which is to allow all.
|
static int |
DEFAULT_REVISION
Deprecated.
The default revision of one is not specified.
|
static String |
FILTER_NAME
Deprecated.
The 'Filter' name for this security handler.
|
static int |
REVISION2
Deprecated.
Encryption revision 2.
|
static int |
REVISION3
Deprecated.
Encryption revision 3.
|
static int |
REVISION4
Deprecated.
Encryption revision 4.
|
DEFAULT_LENGTH, DEFAULT_NAME, DEFAULT_VERSION, encryptionDictionary, VERSION0_UNDOCUMENTED_UNSUPPORTED, VERSION1_40_BIT_ALGORITHM, VERSION2_VARIABLE_LENGTH_ALGORITHM, VERSION3_UNPUBLISHED_ALGORITHM, VERSION4_SECURITY_HANDLER
Constructor and Description |
---|
PDStandardEncryption()
Deprecated.
Default constructor that uses Version 2, Revision 3, 40 bit encryption,
all permissions allowed.
|
PDStandardEncryption(COSDictionary dict)
Deprecated.
Constructor from existing dictionary.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAssembleDocument()
Deprecated.
This will tell if the user can insert/rotate/delete pages.
|
boolean |
canExtractContent()
Deprecated.
This will tell if the user can extract text and images from the PDF document.
|
boolean |
canExtractForAccessibility()
Deprecated.
This will tell if the user can extract text and images from the PDF document
for accessibility purposes.
|
boolean |
canFillInForm()
Deprecated.
This will tell if the user can fill in interactive forms.
|
boolean |
canModify()
Deprecated.
This will tell if the user can modify contents of the document.
|
boolean |
canModifyAnnotations()
Deprecated.
This will tell if the user can add/modify text annotations, fill in interactive forms fields.
|
boolean |
canPrint()
Deprecated.
This will tell if the user can print.
|
boolean |
canPrintDegraded()
Deprecated.
This will tell if the user can print the document in a degraded format.
|
byte[] |
getOwnerKey()
Deprecated.
This will get the O entry in the standard encryption dictionary.
|
int |
getPermissions()
Deprecated.
This will get the permissions bit mask.
|
int |
getRevision()
Deprecated.
This will return the R entry of the encryption dictionary.
|
byte[] |
getUserKey()
Deprecated.
This will get the U entry in the standard encryption dictionary.
|
void |
setCanAssembleDocument(boolean allowAssembly)
Deprecated.
Set if the user can insert/rotate/delete pages.
|
void |
setCanExtractContent(boolean allowExtraction)
Deprecated.
Set if the user can extract content from the document.
|
void |
setCanExtractForAccessibility(boolean allowExtraction)
Deprecated.
Set if the user can extract content from the document for accessibility purposes.
|
void |
setCanFillInForm(boolean allowFillingInForm)
Deprecated.
Set if the user can fill in interactive forms.
|
void |
setCanModify(boolean allowModifications)
Deprecated.
Set if the user can modify the document.
|
void |
setCanModifyAnnotations(boolean allowAnnotationModification)
Deprecated.
Set if the user can modify annotations.
|
void |
setCanPrint(boolean allowPrinting)
Deprecated.
Set if the user can print.
|
void |
setCanPrintDegraded(boolean allowAssembly)
Deprecated.
Set if the user can print the document in a degraded format.
|
void |
setOwnerKey(byte[] o)
Deprecated.
This will set the O entry in the standard encryption dictionary.
|
void |
setPermissions(int p)
Deprecated.
This will set the permissions bit mask.
|
void |
setRevision(int revision)
Deprecated.
This will set the R entry of the encryption dictionary.
|
void |
setUserKey(byte[] u)
Deprecated.
This will set the U entry in the standard encryption dictionary.
|
getCOSDictionary, getCryptFilterDictionary, getFilter, getLength, getRecipientsLength, getRecipientStringAt, getStdCryptFilterDictionary, getStreamFilterName, getStringFilterName, getSubFilter, getVersion, isEncryptMetaData, setFilter, setLength, setRecipients, setSubFilter, setVersion
public static final String FILTER_NAME
public static final int DEFAULT_REVISION
public static final int REVISION2
public static final int REVISION3
public static final int REVISION4
public static final int DEFAULT_PERMISSIONS
public PDStandardEncryption()
public PDStandardEncryption(COSDictionary dict)
dict
- The existing encryption dictionary.public int getRevision()
getRevision
in class PDEncryptionDictionary
public void setRevision(int revision)
setRevision
in class PDEncryptionDictionary
revision
- The new encryption version.public byte[] getOwnerKey()
getOwnerKey
in class PDEncryptionDictionary
public void setOwnerKey(byte[] o) throws IOException
setOwnerKey
in class PDEncryptionDictionary
o
- A 32 byte array or null if there is no owner key.IOException
- If there is an error setting the data.public byte[] getUserKey()
getUserKey
in class PDEncryptionDictionary
public void setUserKey(byte[] u) throws IOException
setUserKey
in class PDEncryptionDictionary
u
- A 32 byte array.IOException
- If there is an error setting the data.public int getPermissions()
getPermissions
in class PDEncryptionDictionary
public void setPermissions(int p)
setPermissions
in class PDEncryptionDictionary
p
- The new permissions bit maskpublic boolean canPrint()
public void setCanPrint(boolean allowPrinting)
allowPrinting
- A boolean determining if the user can print.public boolean canModify()
public void setCanModify(boolean allowModifications)
allowModifications
- A boolean determining if the user can modify the document.public boolean canExtractContent()
public void setCanExtractContent(boolean allowExtraction)
allowExtraction
- A boolean determining if the user can extract content
from the document.public boolean canModifyAnnotations()
public void setCanModifyAnnotations(boolean allowAnnotationModification)
allowAnnotationModification
- A boolean determining if the user can modify annotations.public boolean canFillInForm()
public void setCanFillInForm(boolean allowFillingInForm)
allowFillingInForm
- A boolean determining if the user can fill in interactive forms.public boolean canExtractForAccessibility()
public void setCanExtractForAccessibility(boolean allowExtraction)
allowExtraction
- A boolean determining if the user can extract content
from the document.public boolean canAssembleDocument()
public void setCanAssembleDocument(boolean allowAssembly)
allowAssembly
- A boolean determining if the user can assemble the document.public boolean canPrintDegraded()
public void setCanPrintDegraded(boolean allowAssembly)
allowAssembly
- A boolean determining if the user can print the
document in a degraded format.Copyright © 2002-2015 The Apache Software Foundation. All Rights Reserved.