Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.encryption » [javadoc | source]
org.apache.pdfbox.pdmodel.encryption
public class: AccessPermission [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.encryption.AccessPermission
This class represents the access permissions to a document. These permissions are specified in the PDF format specifications, they include: This class can be used to protect a document by assigning access permissions to recipients. In this case, it must be used with a specific ProtectionPolicy. When a document is decrypted, it has a currentAccessPermission property which is the access permissions granted to the user who decrypted the document.
Constructor:
 public AccessPermission() 
 public AccessPermission(byte[] b) 
 public AccessPermission(int permissions) 
Method from org.apache.pdfbox.pdmodel.encryption.AccessPermission Summary:
canAssembleDocument,   canExtractContent,   canExtractForAccessibility,   canFillInForm,   canModify,   canModifyAnnotations,   canPrint,   canPrintDegraded,   getOwnerAccessPermission,   getPermissionBytes,   getPermissionBytesForPublicKey,   isOwnerPermission,   isReadOnly,   setCanAssembleDocument,   setCanExtractContent,   setCanExtractForAccessibility,   setCanFillInForm,   setCanModify,   setCanModifyAnnotations,   setCanPrint,   setCanPrintDegraded,   setReadOnly
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.encryption.AccessPermission Detail:
 public boolean canAssembleDocument() 
    This will tell if the user can insert/rotate/delete pages.
 public boolean canExtractContent() 
    This will tell if the user can extract text and images from the PDF document.
 public boolean canExtractForAccessibility() 
    This will tell if the user can extract text and images from the PDF document for accessibility purposes.
 public boolean canFillInForm() 
    This will tell if the user can fill in interactive forms.
 public boolean canModify() 
    This will tell if the user can modify contents of the document.
 public boolean canModifyAnnotations() 
    This will tell if the user can add/modify text annotations, fill in interactive forms fields.
 public boolean canPrint() 
    This will tell if the user can print.
 public boolean canPrintDegraded() 
    This will tell if the user can print the document in a degraded format.
 public static AccessPermission getOwnerAccessPermission() 
    returns an access permission object for a document owner.
 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.
 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.
 public boolean isOwnerPermission() 
    This will tell if the access permission corresponds to owner access permission (no restriction).
 public boolean isReadOnly() 
    This will tell if the object has been set as read only.
 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
 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
 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
 public  void setCanFillInForm(boolean allowFillingInForm) 
    Set if the user can fill in interactive forms. This method will have no effect if the object is in read only mode
 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
 public  void setCanModifyAnnotations(boolean allowAnnotationModification) 
    Set if the user can modify annotations. This method will have no effect if the object is in read only mode
 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
 public  void setCanPrintDegraded(boolean allowAssembly) 
    Set if the user can print the document in a degraded format. This method will have no effect if the object is in read only mode
 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 currentAccessPermssion of a document to avoid users to change access permission.