ProtectionPolicy, org.apache.pdfbox.pdmodel.PDDocument#getCurrentAccessPermission()
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | AccessPermission(byte[]
the bytes as defined in PDF specs b)Create a new access permission object from a byte array. |
| public | AccessPermission(int
The permission bits. permissions)Creates a new access permission object from a single integer. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true If supplied with the user password they are allowed to assemble the document.This will tell if the user can insert/rotate/delete pages. |
| public boolean | Returns: true If supplied with the user password they are allowed to extract content from the PDF documentThis will tell if the user can extract text and images from the PDF document. |
| public boolean | Returns: true If supplied with the user password they are allowed to extract content from the PDF documentThis will tell if the user can extract text and images from the PDF document for accessibility purposes. |
| public boolean | Returns: true If supplied with the user password they are allowed to fill in form fields.This will tell if the user can fill in interactive form fields (including signature fields)
even if |
| public boolean | Returns: true If supplied with the user password they are allowed to modify the documentThis will tell if the user can modify contents of the document. |
| public boolean | Returns: true If supplied with the user password they are allowed to modify annotations.This will tell if the user can add or modify text annotations and fill in interactive forms
fields and, if |
| public boolean | Returns: true If supplied with the user password they are allowed to print.This will tell if the user can print. |
| public boolean | Returns: true If supplied with the user password they are allowed to print the document in a faithful format.This will tell if the user can print the document in a faithful format or in a degraded format (if print is enabled). |
| public static AccessPermission | Returns: A standard owner access permission set.returns an access permission object for a document owner. |
| public int | Returns: the integer representing the access permissionsThe returns an integer representing the access permissions. |
| public int | Returns: the integer representing access permissionsThis returns an integer representing the access permissions. |
| protected boolean | Returns: true if any revision 3 access permission is setIndicates if any revision 3 access permission is set or not. |
| public boolean | Returns: true if the access permission does not restrict the use of the documentThis will tell if the access permission corresponds to owner access permission (no restriction). |
| private boolean | |
| public boolean | Returns: true if the object is in read only mode.This will tell if the object has been set as read only. |
| public void | setCanAssembleDocument(boolean
A boolean determining if the user can assemble the document. allowAssembly)Set if the user can insert/rotate/delete pages. |
| public void | setCanExtractContent(boolean
A boolean determining if the user can extract content
from the document. allowExtraction)Set if the user can extract content from the document. |
| public void | setCanExtractForAccessibility(boolean
A boolean determining if the user can extract content
from the document. allowExtraction)Set if the user can extract content from the document for accessibility purposes. |
| public void | setCanFillInForm(boolean
A boolean determining if the user can fill in interactive forms. allowFillingInForm)Set if the user can fill in interactive form fields (including signature fields) even if
|
| public void | setCanModify(boolean
A boolean determining if the user can modify the document. allowModifications)Set if the user can modify the document. |
| public void | setCanModifyAnnotations(boolean
A boolean determining the new setting. allowAnnotationModification)Set if the user can add or modify text annotations and fill in interactive forms fields and,
if |
| public void | setCanPrint(boolean
A boolean determining if the user can print. allowPrinting)Set if the user can print. |
| public void | setCanPrintFaithful(boolean
A boolean determining if the user can print the document in a
faithful format. canPrintFaithful)Set if the user can print the document in a faithful format or in a degraded format (if print is enabled). |
| private boolean | |
| public void |
| ASSEMBLE_DOCUMENT_BIT | back to summary |
|---|---|
| private static final int ASSEMBLE_DOCUMENT_BIT | |
| bytes | back to summary |
|---|---|
| private int bytes | |
| DEFAULT_PERMISSIONS | back to summary |
|---|---|
| private static final int DEFAULT_PERMISSIONS | |
| EXTRACT_BIT | back to summary |
|---|---|
| private static final int EXTRACT_BIT | |
| EXTRACT_FOR_ACCESSIBILITY_BIT | back to summary |
|---|---|
| private static final int EXTRACT_FOR_ACCESSIBILITY_BIT | |
| FAITHFUL_PRINT_BIT | back to summary |
|---|---|
| private static final int FAITHFUL_PRINT_BIT | |
| FILL_IN_FORM_BIT | back to summary |
|---|---|
| private static final int FILL_IN_FORM_BIT | |
| MODIFICATION_BIT | back to summary |
|---|---|
| private static final int MODIFICATION_BIT | |
| MODIFY_ANNOTATIONS_BIT | back to summary |
|---|---|
| private static final int MODIFY_ANNOTATIONS_BIT | |
| PRINT_BIT | back to summary |
|---|---|
| private static final int PRINT_BIT | |
| readOnly | back to summary |
|---|---|
| private boolean readOnly | |
| AccessPermission | back to summary |
|---|---|
| public AccessPermission() Create a new access permission object. By default, all permissions are granted. | |
| AccessPermission | back to summary |
|---|---|
| public AccessPermission(byte[] b) Create a new access permission object from a byte array. Bytes are ordered most significant byte first.
| |
| AccessPermission | back to summary |
|---|---|
| public AccessPermission(int permissions) Creates a new access permission object from a single integer.
| |
| canAssembleDocument | back to summary |
|---|---|
| public boolean canAssembleDocument() This will tell if the user can insert/rotate/delete pages.
| |
| canExtractContent | back to summary |
|---|---|
| public boolean canExtractContent() This will tell if the user can extract text and images from the PDF document.
| |
| canExtractForAccessibility | back to summary |
|---|---|
| public boolean canExtractForAccessibility() This will tell if the user can extract text and images from the PDF document for accessibility purposes.
| |
| canFillInForm | back to summary |
|---|---|
| public boolean canFillInForm() This will tell if the user can fill in interactive form fields (including signature fields)
even if
| |
| canModify | back to summary |
|---|---|
| public boolean canModify() This will tell if the user can modify contents of the document.
| |
| canModifyAnnotations | back to summary |
|---|---|
| public boolean canModifyAnnotations() This will tell if the user can add or modify text annotations and fill in interactive forms
fields and, if
| |
| canPrint | back to summary |
|---|---|
| public boolean canPrint() This will tell if the user can print.
| |
| canPrintFaithful | back to summary |
|---|---|
| public boolean canPrintFaithful() This will tell if the user can print the document in a faithful format or in a degraded format (if print is enabled).
| |
| getOwnerAccessPermission | back to summary |
|---|---|
| public static AccessPermission getOwnerAccessPermission() returns an access permission object for a document owner.
| |
| getPermissionBytes | back to summary |
|---|---|
| public int getPermissionBytes() The returns an integer representing the access permissions. This integer can be used for standard PDF encryption as specified in the PDF specifications.
| |
| getPermissionBytesForPublicKey | back to summary |
|---|---|
| public int getPermissionBytesForPublicKey() This returns an integer representing the access permissions. This integer can be used for public key encryption. This format is not documented in the PDF specifications but is necessary for compatibility with Adobe Acrobat and Adobe Reader.
| |
| hasAnyRevision3PermissionSet | back to summary |
|---|---|
| protected boolean hasAnyRevision3PermissionSet() Indicates if any revision 3 access permission is set or not.
| |
| isOwnerPermission | back to summary |
|---|---|
| public boolean isOwnerPermission() This will tell if the access permission corresponds to owner access permission (no restriction).
| |
| isPermissionBitOn | back to summary |
|---|---|
| private boolean isPermissionBitOn(int bit) | |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() This will tell if the object has been set as read only.
| |
| setCanAssembleDocument | back to summary |
|---|---|
| public void setCanAssembleDocument(boolean allowAssembly) Set if the user can insert/rotate/delete pages. This method will have no effect if the object is in read only mode.
| |
| setCanExtractContent | back to summary |
|---|---|
| public void setCanExtractContent(boolean allowExtraction) Set if the user can extract content from the document. This method will have no effect if the object is in read only mode.
| |
| setCanExtractForAccessibility | back to summary |
|---|---|
| public void setCanExtractForAccessibility(boolean allowExtraction) Set if the user can extract content from the document for accessibility purposes. This method will have no effect if the object is in read only mode.
| |
| setCanFillInForm | back to summary |
|---|---|
| public void setCanFillInForm(boolean allowFillingInForm) Set if the user can fill in interactive form fields (including signature fields) even if
This method will have no effect if the object is in read only mode.
| |
| setCanModify | back to summary |
|---|---|
| public void setCanModify(boolean allowModifications) Set if the user can modify the document. This method will have no effect if the object is in read only mode.
| |
| setCanModifyAnnotations | back to summary |
|---|---|
| public void setCanModifyAnnotations(boolean allowAnnotationModification) Set if the user can add or modify text annotations and fill in interactive forms fields and,
if This method will have no effect if the object is in read only mode.
| |
| setCanPrint | back to summary |
|---|---|
| public void setCanPrint(boolean allowPrinting) Set if the user can print. This method will have no effect if the object is in read only mode.
| |
| setCanPrintFaithful | back to summary |
|---|---|
| public void setCanPrintFaithful(boolean canPrintFaithful) Set if the user can print the document in a faithful format or in a degraded format (if print is enabled). The PDF version must be 1.5 or higher. This method will have no effect if the object is in read only mode.
| |
| setPermissionBit | back to summary |
|---|---|
| private boolean setPermissionBit(int bit, boolean value) | |
| setReadOnly | back to summary |
|---|---|
| public void setReadOnly() Locks the access permission read only (ie, the setters will have no effects). After that, the object cannot be unlocked. This method is used for the currentAccessPermission of a document to avoid users to change access permission. | |