|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.security.Permissions
public class Permissions
Standard encryption has permissions associated with it which is defined by a key in the encryption dictionary. It is up to the viewer application to respect these permissions.
The value of the P key is an unsigned 32-bit integer containing a set of flags specifying which access permissions should be granted when the document is opened with user access. The below list shows the meanings of these flags. Bit positions within the flag word are numbered from 1 (low-order) to 32 (high-order); a 1 bit in any position enables the corresponding access permission. Which bits are meaningful, and in some cases how they are interpreted, depends on the security handler's revision number (specified in the encryption dictionary's R entry).
| Bits | Meaning |
| 1-2 | Reserved; must be 0. |
| 3 | (Revision 2) Print the document. (Revision 3) Print the document (possibly not at the highest quality (possibly not at the highest quality level, depending on whether bit 12 is also set). |
| 4 | Modify the contents of the document by operations other than those controlled by bits 6, 9, and 11. |
| 5 | (Revision 2) Copy or otherwise extract text and graphics from the document, including extracting text and graphics (in support of accessibility to disabled users or for other purposes). (Revision 3) Copy or otherwise extract text and graphics from the document by operations other than that controlled by bit 10. |
| 6 | Add or modify text annotations, fill in interactive form fields, and, if bit 4 is also set, create or modify interactive form fields (including signature fields). |
| 7-8 | Reserved; must be 1. |
| 9 | (Revision 3 only) Fill in existing interactive form fields (including signature fields), even if bit 6 is clear. |
| 10 | (Revision 3 only) Extract text and graphics (in support of accessibility to disabled users or for other purposes). |
| 11 | (Revision 3 only) Assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), even if bit 4 is clear. |
| 12 | (Revision 3 only) Print the document to a representation from which a faithful digital copy of the PDF content could be generated. When this bit is clear (and bit 3 is set), printing is limited to a lowlevel representation of the appearance, possibly of degraded quality. |
| 13-32 | (Revision 3 only) Reserved; must be 1. |
| Field Summary | |
|---|---|
static int |
AUTHORING_FORM_FIELDS
Determine if authoring comments and form fields is allowed. |
static int |
CONTENT_ACCESSABILITY
Determine if content accessibility is allowed. |
static int |
CONTENT_EXTRACTION
Determine if content copying or extraction is allowed. |
static int |
DOCUMENT_ASSEMBLY
Determine if document assembly is allowed. |
static int |
FORM_FIELD_FILL_SIGNING
Determine if form field fill-in or signing is allowed. |
static int |
MODIFY_DOCUMENT
Determine if changing the document is allowed. |
static int |
PRINT_DOCUMENT
Determine if printing of document is allowed. |
static int |
PRINT_DOCUMENT_QUALITY
Determine the quality of printed allowed. |
| Constructor Summary | |
|---|---|
Permissions(EncryptionDictionary dictionary)
Creates a new object which can determine a document's user permissions. |
|
| Method Summary | |
|---|---|
boolean |
getPermissions(int permissionIndex)
Gets the permission value of the specified Permission constant. |
void |
init()
Initiate the permission object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PRINT_DOCUMENT
public static final int PRINT_DOCUMENT_QUALITY
public static final int MODIFY_DOCUMENT
public static final int CONTENT_EXTRACTION
public static final int AUTHORING_FORM_FIELDS
public static final int FORM_FIELD_FILL_SIGNING
public static final int CONTENT_ACCESSABILITY
public static final int DOCUMENT_ASSEMBLY
| Constructor Detail |
|---|
public Permissions(EncryptionDictionary dictionary)
dictionary - Encryption dictionary which contains a P key.| Method Detail |
|---|
public void init()
public boolean getPermissions(int permissionIndex)
permissionIndex - one of the classes constants for determining a
specific user permission.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||