com.qoppa.pdf
Class PDFPermissions

java.lang.Object
  extended by com.qoppa.pdf.permissions.PasswordPermissions
      extended by com.qoppa.pdf.PDFPermissions
All Implemented Interfaces:
IPDFPermissions

Deprecated. This class is deprecated. Use the new PasswordPermissions instead.

public class PDFPermissions
extends PasswordPermissions

This class contains information regarding a PDF document permissions. The list of permissions are the following: assemble the document, change the document, extract text and graphics, extract content for accessibility, fill form fields, modify annotations, print, print high resolution.

Author:
Qoppa Software

Field Summary
static int DO_NOT_USE_ENCRYPTION_AES_256_R5
          Deprecated. DO NOT USE. This encryption type was deprecated by the PDF specifications, DO NOT USE.
static int ENCRYPTION_AES
          Deprecated. Use PasswordPermissions.ENCRYPTION_AES_128 instead
static int ENCRYPTION_AES_128
          Deprecated. Use PasswordPermissions.ENCRYPTION_AES_128 instead.
static int ENCRYPTION_AES_256
          Deprecated. Use PasswordPermissions.ENCRYPTION_AES_256 instead.
static int ENCRYPTION_RC4
          Deprecated. Use PasswordPermissions.ENCRYPTION_RC4_128 instead
static int ENCRYPTION_RC4_128
          Deprecated. Use PasswordPermissions.ENCRYPTION_RC4_128 instead.
static int ENCRYPTION_RC4_40
          Deprecated. Use PasswordPermissions.ENCRYPTION_RC4_40 instead.
 
Constructor Summary
PDFPermissions()
          Deprecated.  
PDFPermissions(boolean allperms)
          Deprecated.  
PDFPermissions(int perms, boolean ownerPasswordEntered)
          Deprecated.  
 
Method Summary
 int getPermFlag()
          Deprecated.  
 boolean hasAllPermissions()
          Deprecated.  
 boolean isAssembleDocumentAllowed()
          Deprecated.  
 boolean isChangeDocumentAllowed()
          Deprecated.  
 boolean isExtractTextGraphicsAllowed()
          Deprecated.  
 boolean isExtractTextGraphicsForAccessibilityAllowed()
          Deprecated.  
 boolean isFillFormFieldsAllowed()
          Deprecated.  
 boolean isModifyAnnotsAllowed()
          Deprecated.  
 boolean isPrintAllowed()
          Deprecated.  
 boolean isPrintHighResAllowed()
          Deprecated.  
 boolean ownerPasswordEntered()
          Deprecated.  
 void setAssembleDocumentAllowed(boolean allowed)
          Deprecated.  
 void setChangeDocumentAllowed(boolean allowed)
          Deprecated.  
 void setExtractTextGraphicsAllowed(boolean allowed)
          Deprecated.  
 void setExtractTextGraphicsForAccessibilityAllowed(boolean allowed)
          Deprecated.  
 void setFillFormFieldsAllowed(boolean allowed)
          Deprecated.  
 void setModifyAnnotsAllowed(boolean allowed)
          Deprecated.  
 void setPermFlag(int perms)
          Deprecated.  
 void setPrintAllowed(boolean allowed)
          Deprecated.  
 void setPrintHighResAllowed(boolean allowed)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCRYPTION_RC4

public static final int ENCRYPTION_RC4
Deprecated. Use PasswordPermissions.ENCRYPTION_RC4_128 instead
RC4 Encryption - 128 bits

See Also:
Constant Field Values

ENCRYPTION_RC4_128

public static final int ENCRYPTION_RC4_128
Deprecated. Use PasswordPermissions.ENCRYPTION_RC4_128 instead.
RC4 Encryption - 128 bits

See Also:
Constant Field Values

ENCRYPTION_AES

public static final int ENCRYPTION_AES
Deprecated. Use PasswordPermissions.ENCRYPTION_AES_128 instead
AES Encryption - 128 bits

See Also:
Constant Field Values

ENCRYPTION_AES_128

public static final int ENCRYPTION_AES_128
Deprecated. Use PasswordPermissions.ENCRYPTION_AES_128 instead.
AES Encryption - 128 bits

See Also:
Constant Field Values

ENCRYPTION_RC4_40

public static final int ENCRYPTION_RC4_40
Deprecated. Use PasswordPermissions.ENCRYPTION_RC4_40 instead.
RC4 Encryption - 40 bits

See Also:
Constant Field Values

ENCRYPTION_AES_256

public static final int ENCRYPTION_AES_256
Deprecated. Use PasswordPermissions.ENCRYPTION_AES_256 instead.
AES Encryption 256 bits. This is only available if the Java JVM provides unlimited strength encryption.

See Also:
Constant Field Values

DO_NOT_USE_ENCRYPTION_AES_256_R5

public static final int DO_NOT_USE_ENCRYPTION_AES_256_R5
Deprecated. DO NOT USE. This encryption type was deprecated by the PDF specifications, DO NOT USE.
DO NOT USE. This encryption was deprecated by the PDF specifications because it is considered not safe. It was briefly made available by Adbe Acr 9, but is not supported by X or later.

See Also:
Constant Field Values
Constructor Detail

PDFPermissions

public PDFPermissions()
Deprecated. 

Creates a new PDFPermissions object with all permissions granted.


PDFPermissions

public PDFPermissions(boolean allperms)
Deprecated. 

Creates a new PDFPermissions object with all permissions set to allperms.

Parameters:
allperms - flag for all permissions

PDFPermissions

public PDFPermissions(int perms,
                      boolean ownerPasswordEntered)
Deprecated. 

Creates a new PDFPermissions object using perms, the permissions integer representing the 12 permissions bits as specified in the PDF documentation.

Parameters:
perms - the permissions integer representing the 12 permissions bits as specified in the PDF documentation.
ownerPasswordEntered - flag indicating wether the owner password was entered when opening the document
Method Detail

getPermFlag

public int getPermFlag()
Deprecated. 

Returns the permissions int representing the 12 permissions bits as specified in the PDF documentation.

Overrides:
getPermFlag in class PasswordPermissions

hasAllPermissions

public boolean hasAllPermissions()
Deprecated. 

Returns true if all permissions are granted for the document.

Overrides:
hasAllPermissions in class PasswordPermissions
Returns:
true if all permissions are granted.

isAssembleDocumentAllowed

public boolean isAssembleDocumentAllowed()
Deprecated. 

Returns the permission to assemble the document: - insert, rotate or delete pages - create bookmarks - create thumbnail images This permission is automatically granted if the permission to change the document is granted (@see PDFPermissions#isChangeDocumentAllowed()).

Specified by:
isAssembleDocumentAllowed in interface IPDFPermissions
Overrides:
isAssembleDocumentAllowed in class PasswordPermissions
Returns:
Permission to assemble the document.

isChangeDocumentAllowed

public boolean isChangeDocumentAllowed()
Deprecated. 

Returns the permission to change the document. When this permission is granted, the 3 following permissions are also granted: Assemble document @see PDFPermissions#isAssembleDocumentAllowed() Modify Annotations @see PDFPermissions#isModifyAnnotsAllowed() Fill Form Fields @see PDFPermissions#isFillFormFieldsAllowed()

Specified by:
isChangeDocumentAllowed in interface IPDFPermissions
Overrides:
isChangeDocumentAllowed in class PasswordPermissions
Returns:
Permission to change the document.

isExtractTextGraphicsAllowed

public boolean isExtractTextGraphicsAllowed()
Deprecated. 

Returns the permission to extract text and graphics. When this permission is granted, the permission to extract for accessibility is automatically granted (@see PDFPermissions#isExtractTextGraphicsForAccessibilityAllowed()). When this permission is not granted, the permission to extract for accessibility can be set independently.

Specified by:
isExtractTextGraphicsAllowed in interface IPDFPermissions
Overrides:
isExtractTextGraphicsAllowed in class PasswordPermissions
Returns:
Permission to extract text and graphics.

isExtractTextGraphicsForAccessibilityAllowed

public boolean isExtractTextGraphicsForAccessibilityAllowed()
Deprecated. 

Returns the permission to extract text and graphics in support of accessibility to disabled users or other purposes. This permission is automatically granted when the permission to extract text and graphics is granted (@see PDFPermissions#isExtractTextGraphicsAllowed()).

Specified by:
isExtractTextGraphicsForAccessibilityAllowed in interface IPDFPermissions
Overrides:
isExtractTextGraphicsForAccessibilityAllowed in class PasswordPermissions
Returns:
Permission to extract text and graphics for accessibility.

isFillFormFieldsAllowed

public boolean isFillFormFieldsAllowed()
Deprecated. 

Returns the permission to fill form fields and sign the document. This permission is automatically granted if the modify annotations permissions is granted (@see PDFPermissions#isModifyAnnotsAllowed()) or if the permission to change the document is granted (@see PDFPermissions#isChangeDocumentAllowed()). When this permission is granted and the permission to change document is also granted, create or modify interactive form fields (including signature fields) is allowed.");

Specified by:
isFillFormFieldsAllowed in interface IPDFPermissions
Overrides:
isFillFormFieldsAllowed in class PasswordPermissions
Returns:
Permission to fill form fields.

isModifyAnnotsAllowed

public boolean isModifyAnnotsAllowed()
Deprecated. 

Returns the permission to add or modify text annotations in the document. When this permission is granted, the permission to fill form fields is automatically granted (@see PDFPermissions#isFillFormFieldsAllowed()). When this permission is not granted, then the permission to fill form fields can be granted independently. When this permission is granted and the permission to change document is also granted (@see PDFPermissions#isChangeDocumentAllowed()), create or modify interactive form fields (including signature fields) is allowed."); This permission is automatically granted if the permission to change the document is granted (@see PDFPermissions#isChangeDocumentAllowed()).

Specified by:
isModifyAnnotsAllowed in interface IPDFPermissions
Overrides:
isModifyAnnotsAllowed in class PasswordPermissions
Returns:
Permission to add or modify text annotations.

isPrintAllowed

public boolean isPrintAllowed()
Deprecated. 

Returns the permission to print the document. This permission is automatically granted if the permission to print the document at high resolution is granted (@see PDFPermissions#isPrintHighResAllowed())

Specified by:
isPrintAllowed in interface IPDFPermissions
Overrides:
isPrintAllowed in class PasswordPermissions
Returns:
Permission to print the document.

isPrintHighResAllowed

public boolean isPrintHighResAllowed()
Deprecated. 

Returns the permission to print the document at high resolution. When this permission is granted, the permission to print the document is automatically granted (@see PDFPermissions#isPrintAllowed()). When this permission is not granted, then the permission to print the document can be granted independently.

Specified by:
isPrintHighResAllowed in interface IPDFPermissions
Overrides:
isPrintHighResAllowed in class PasswordPermissions
Returns:
Permission to print the document at high resolution.

ownerPasswordEntered

public boolean ownerPasswordEntered()
Deprecated. 

Return a flag indicating whether the document was opened using the owner password if the document is encrypted. This flag is useful when enforcing permissions, if the document was opened with the owner password then application should allow any operations on the PDF document. If the document is not encrypted, this flag will return true

Overrides:
ownerPasswordEntered in class PasswordPermissions

setAssembleDocumentAllowed

public void setAssembleDocumentAllowed(boolean allowed)
Deprecated. 

Sets the permission to assemble the document. Assembling the document can be done by: - inserting, rotating or deleting pages - creating bookmarks - creating thumbnail images

Overrides:
setAssembleDocumentAllowed in class PasswordPermissions
Parameters:
allowed - the permission to assemble the document.
See Also:
setChangeDocumentAllowed(boolean)

setChangeDocumentAllowed

public void setChangeDocumentAllowed(boolean allowed)
Deprecated. 

Sets the permission to change the document. When this permission is granted, the 3 permissions: Assemble Document (@see PDFPermissions#setAssembleDocumentAllowed(boolean)) Modify Annotations (@see PDFPermissions#setModifyAnnotsAllowed(boolean)) Fill Form Fields (@see PDFPermissions#setFillFormFieldsAllowed(boolean)) are also automatically granted. When this permission is not granted, the 3 permissions mentioned above can independently be granted.

Overrides:
setChangeDocumentAllowed in class PasswordPermissions
Parameters:
allowed - the permission to change the document

setExtractTextGraphicsAllowed

public void setExtractTextGraphicsAllowed(boolean allowed)
Deprecated. 

Sets the permission to extract text and graphics. When this permission is granted, the permission to extract for accessibility is automatically granted (@see PDFPermissions#isExtractTextGraphicsForAccessibilityAllowed()). When this permission is not granted, the permission to extract for accessibility can be set independently.

Overrides:
setExtractTextGraphicsAllowed in class PasswordPermissions
Parameters:
allowed - the permission to extract text and graphics.

setExtractTextGraphicsForAccessibilityAllowed

public void setExtractTextGraphicsForAccessibilityAllowed(boolean allowed)
Deprecated. 

Sets the permission to extract text and graphics in support of accessibility to disabled users or other purposes.

Overrides:
setExtractTextGraphicsForAccessibilityAllowed in class PasswordPermissions
Parameters:
allowed - the permission to extract text and graphics.
See Also:
isExtractTextGraphicsAllowed()

setFillFormFieldsAllowed

public void setFillFormFieldsAllowed(boolean allowed)
Deprecated. 

Sets the permission to fill form fields and sign the document.

Overrides:
setFillFormFieldsAllowed in class PasswordPermissions
Parameters:
allowed - the permission to fill form fields.
See Also:
setChangeDocumentAllowed(boolean)

setModifyAnnotsAllowed

public void setModifyAnnotsAllowed(boolean allowed)
Deprecated. 

Sets the permission to add or modify annotations in the document. When this permission is granted, the permission to fill form fields is automatically granted (@see PDFPermissions#setFillFormFieldsAllowed(boolean fillFormsAllowed)). When this permission is not granted, then the permission to fill form fields can be granted independently. When this permission is granted and the permission to change document is also granted (@see PDFPermissions#setChangeDocumentAllowed(boolean)), create or modify interactive form fields (including signature fields) is allowed.");

Overrides:
setModifyAnnotsAllowed in class PasswordPermissions
Parameters:
allowed - the permission to add or modify annotations.

setPermFlag

public void setPermFlag(int perms)
Deprecated. 

Sets the permissions from the int representing the 12 permissions bits as specified in the PDF documentation.

Overrides:
setPermFlag in class PasswordPermissions
Parameters:
perms - the permissions int.

setPrintAllowed

public void setPrintAllowed(boolean allowed)
Deprecated. 

Sets the permission to print the document.

Overrides:
setPrintAllowed in class PasswordPermissions
Parameters:
allowed - to print the document.
See Also:
setPrintHighResAllowed(boolean)

setPrintHighResAllowed

public void setPrintHighResAllowed(boolean allowed)
Deprecated. 

Sets the permission to print the document at high resolution. When this permission is granted, the Print permission is also automatically granted (@see PDFPermissions#isPrintAllowed()) When this permission is not granted, the Print permission can be granted independently.

Overrides:
setPrintHighResAllowed in class PasswordPermissions
Parameters:
allowed - the permission to print at high resolution