com.aspose.pdf.elements
Class Security

java.lang.Object
  extended by com.aspose.pdf.elements.Security

public class Security
extends java.lang.Object

Encapsulates information used in pdf Security.


Constructor Summary
Security()
          Initializes a new instance of the Security class.
 
Method Summary
 java.lang.String getMasterPass()
          Gets a string that indicates the master password used in pdf encryption.
 int getPermissions()
           
 java.lang.String getUserPass()
          Gets a string that indicates the user password used in pdf encryption.
 boolean Is128BitsEncrypted()
          Gets a bool value that indicates whether the Pdf documents will be 128 bits or 40 bits encrypted.
 boolean isAnnotationsModifyingAllowed()
          Gets a bool value that indicates whether adding or modifying text annotations is allowed.
 boolean isContentsModifyingAllowed()
          Gets a bool value that indicates whether modifying contents is allowed.
 boolean isCopyingAllowed()
          Gets a bool value that indicates whether copying or otherwise extracting text
and graphics from the document is allowed.
 boolean isDegradedPrintingAllowed()
          Gets a bool value that indicates whether printing in low resolution is allowed.
 boolean isDocumentAssemblyingAllowed()
          Gets a bool value that indicates whether assembling the document is allowed.
 boolean isFormFillingAllowed()
          Gets a bool value that indicates whether filling in forms and signing the document is allowed.
 boolean isPrintingAllowed()
          Gets a bool value that indicates whether printing is allowed.
 boolean isScreenReadersAllowed()
          Gets a bool value that indicates whether screen readers is allowed.
 Security Set128BitsEncrypted(boolean bits128)
          Sets a bool value that indicates whether the Pdf documents will be 128 bits or 40 bits encrypted.
 Security setAnnotationsModifyingAllowed(boolean allowModifyingAnnotations)
          Sets or sets a bool value that indicates whether adding or modifying text annotations is allowed.
 Security setContentsModifyingAllowed(boolean allowModifyingContents)
          Sets a bool value that indicates whether modifying contents is allowed.
 Security setCopyingAllowed(boolean allowCopying)
          Sets a bool value that indicates whether copying or otherwise extracting text
and graphics from the document is allowed.
 Security setDegradedPrintingAllowed(boolean allowDegradedPrinting)
          Sets a bool value that indicates whether printing in low resolution is allowed.
 Security setDocumentAssemblyingAllowed(boolean allowDocumentAssemblying)
          Sets a bool value that indicates whether assembling the document is allowed.
 Security setFormFillingAllowed(boolean allowFormFilling)
          Sets or sets a bool value that indicates whether filling in forms and signing the document is allowed.
 Security setMasterPass(java.lang.String masterPass)
          Sets a string that indicates the master password used in pdf encryption.
 Security setPrintingAllowed(boolean allowPrinting)
          Sets a bool value that indicates whether printing is allowed.
 Security setScreenReadersAllowed(boolean allowScreenReaders)
          Sets a bool value that indicates whether screen readers is allowed.
 Security setUserPass(java.lang.String userPass)
          Sets a string that indicates the user password used in pdf encryption.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Security

public Security()
Initializes a new instance of the Security class.

Method Detail

isCopyingAllowed

public boolean isCopyingAllowed()
Gets a bool value that indicates whether copying or otherwise extracting text
and graphics from the document is allowed. Default is false.

Returns:
Returns the allowCopying.

setCopyingAllowed

public Security setCopyingAllowed(boolean allowCopying)
Sets a bool value that indicates whether copying or otherwise extracting text
and graphics from the document is allowed. Default is false.

Parameters:
allowCopying - The allowCopying to set.

isDegradedPrintingAllowed

public boolean isDegradedPrintingAllowed()
Gets a bool value that indicates whether printing in low resolution is allowed. Default is false.

Returns:
Returns the allowDegradedPrinting.

setDegradedPrintingAllowed

public Security setDegradedPrintingAllowed(boolean allowDegradedPrinting)
Sets a bool value that indicates whether printing in low resolution is allowed. Default is false.

Parameters:
allowDegradedPrinting - The allowDegradedPrinting to set.

isDocumentAssemblyingAllowed

public boolean isDocumentAssemblyingAllowed()
Gets a bool value that indicates whether assembling the document is allowed.
This includes inserting, rotating, or deleting pages and creating navigation elements
such as bookmarks or thumbnail images. Default is false.

Returns:
Returns the allowDocumentAssemblying.

setDocumentAssemblyingAllowed

public Security setDocumentAssemblyingAllowed(boolean allowDocumentAssemblying)
Sets a bool value that indicates whether assembling the document is allowed.
This includes inserting, rotating, or deleting pages and creating navigation elements
such as bookmarks or thumbnail images. Default is false.

Parameters:
allowDocumentAssemblying - The allowDocumentAssemblying to set.

isFormFillingAllowed

public boolean isFormFillingAllowed()
Gets a bool value that indicates whether filling in forms and signing the document is allowed. Default is false.

Returns:
Returns the allowFormFilling.

setFormFillingAllowed

public Security setFormFillingAllowed(boolean allowFormFilling)
Sets or sets a bool value that indicates whether filling in forms and signing the document is allowed. Default is false.

Parameters:
allowFormFilling - The allowFormFilling to set.

isAnnotationsModifyingAllowed

public boolean isAnnotationsModifyingAllowed()
Gets a bool value that indicates whether adding or modifying text annotations is allowed. Default is false.

Returns:
Returns the allowModifyingAnnotations.

setAnnotationsModifyingAllowed

public Security setAnnotationsModifyingAllowed(boolean allowModifyingAnnotations)
Sets or sets a bool value that indicates whether adding or modifying text annotations is allowed. Default is false.

Parameters:
allowModifyingAnnotations - The allowModifyingAnnotations to set.

isContentsModifyingAllowed

public boolean isContentsModifyingAllowed()
Gets a bool value that indicates whether modifying contents is allowed. Default is false.

Returns:
Returns the allowModifyingContents.

setContentsModifyingAllowed

public Security setContentsModifyingAllowed(boolean allowModifyingContents)
Sets a bool value that indicates whether modifying contents is allowed. Default is false.

Parameters:
allowModifyingContents - The allowModifyingContents to set.

isPrintingAllowed

public boolean isPrintingAllowed()
Gets a bool value that indicates whether printing is allowed. Default is false.

Returns:
Returns the allowPrinting.

setPrintingAllowed

public Security setPrintingAllowed(boolean allowPrinting)
Sets a bool value that indicates whether printing is allowed. Default is false.

Parameters:
allowPrinting - The allowPrinting to set.

isScreenReadersAllowed

public boolean isScreenReadersAllowed()
Gets a bool value that indicates whether screen readers is allowed. Default is false.

Returns:
Returns the allowScreenReaders.

setScreenReadersAllowed

public Security setScreenReadersAllowed(boolean allowScreenReaders)
Sets a bool value that indicates whether screen readers is allowed. Default is false.

Parameters:
allowScreenReaders - The allowScreenReaders to set.

Is128BitsEncrypted

public boolean Is128BitsEncrypted()
Gets a bool value that indicates whether the Pdf documents will be 128 bits or 40 bits encrypted. Default is false, 40 bits encrypted.

Returns:
Returns the bits128.

Set128BitsEncrypted

public Security Set128BitsEncrypted(boolean bits128)
Sets a bool value that indicates whether the Pdf documents will be 128 bits or 40 bits encrypted. Default is false, 40 bits encrypted.

Parameters:
bits128 - The bits128 to set.

getMasterPass

public java.lang.String getMasterPass()
Gets a string that indicates the master password used in pdf encryption.

Returns:
Returns the masterPass.

setMasterPass

public Security setMasterPass(java.lang.String masterPass)
Sets a string that indicates the master password used in pdf encryption.

Parameters:
masterPass - The masterPass to set.

getUserPass

public java.lang.String getUserPass()
Gets a string that indicates the user password used in pdf encryption.

Returns:
Returns the userPass.

setUserPass

public Security setUserPass(java.lang.String userPass)
Sets a string that indicates the user password used in pdf encryption.

Parameters:
userPass - The userPass to set.

getPermissions

public int getPermissions()