DynamicPDF by ceTe Software

com.cete.dynamicpdf.cryptography
Class RC4128Security

java.lang.Object
  extended by com.cete.dynamicpdf.Security
      extended by com.cete.dynamicpdf.cryptography.RC4128Security

public class RC4128Security
extends Security

RC4 128 bit PDF security, with UseCryptFilter property set to false is compatible with PDF version 1.4 or higher and can be read with Adobe Acrobat Reader version 5 or higher. By default UseCryptFilter property is false. RC4 128 bit PDF security with crypt filter is compatible with PDF version 1.5 or higher and can be read with Adobe Acrobat Reader version 6 and higher. Older readers will not be able to read document encrypted with this security. For more details on RC4 128 bit security take a look at the Security topic.

Licensing:
This class is a DynamicPDF Merger Standard Edition feature. One of the following licenses is required for non-evaluation usage:

View Example


Field Summary
 
Fields inherited from class com.cete.dynamicpdf.Security
text_Filter, text_Length, text_Standard
 
Constructor Summary
RC4128Security()
          Initializes a new instance of the RC4128Security class.
RC4128Security(java.lang.String password)
          Initializes a new instance of the RC4128Security class.
RC4128Security(java.lang.String ownerPassword, java.lang.String userPassword)
          Initializes a new instance of the class.
 
Method Summary
 void draw(DocumentWriter writer, Encrypter encrypter)
          Draws the encrypter dictionary to the given DocumentWriter object.
 boolean getAllowAccessibility()
          Gets if accessibility programs should be able to read the documents text and images for the user.
 boolean getAllowDocumentAssembly()
          Gets if the document can be assembled and manipulated by the user.
 boolean getAllowFormFilling()
          Gets if form filling should be allowed by the user.
 boolean getAllowHighResolutionPrinting()
          Gets if the document can be printed at a high resolution by the user.
 Encrypter getEncrypter(byte[] id)
          Gets a 128 bit Encrypter object to be used for encrypting the document.
 boolean getEncryptMetadata()
          Gets if the document metadata to be encrypted.
 boolean getUseCryptFilter()
          Gets if the encryption should be done with crypt filters.
 void setAllowAccessibility(boolean value)
          Sets if accessibility programs should be able to read the documents text and images for the user.
 void setAllowDocumentAssembly(boolean value)
          Sets if the document can be assembled and manipulated by the user.
 void setAllowFormFilling(boolean value)
          Sets if form filling should be allowed by the user.
 void setAllowHighResolutionPrinting(boolean value)
          Sets if the document can be printed at a high resolution by the user.
 void setEncryptMetadata(boolean value)
          Sets if the document metadata to be encrypted.
 void setUseCryptFilter(boolean value)
          Sets if the encryption should be done with crypt filters.
 
Methods inherited from class com.cete.dynamicpdf.Security
binPassword, getAllowCopy, getAllowEdit, getAllowPrint, getAllowUpdateAnnotsAndFields, getFiller, getOwnerPassword, getUserPassword, setAllowCopy, setAllowEdit, setAllowPrint, setAllowUpdateAnnotsAndFields, setOwnerPassword, setUserPassword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RC4128Security

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


RC4128Security

public RC4128Security(java.lang.String ownerPassword,
                      java.lang.String userPassword)
Initializes a new instance of the class.

Parameters:
ownerPassword - The owner password to open the document.
userPassword - The user password to open the document.

RC4128Security

public RC4128Security(java.lang.String password)
Initializes a new instance of the RC4128Security class.

Parameters:
password - The owner and user password to open the document.
Method Detail

setAllowFormFilling

public void setAllowFormFilling(boolean value)
Sets if form filling should be allowed by the user.

Parameters:
value - if form filling should be allowed by the user.

getAllowFormFilling

public boolean getAllowFormFilling()
Gets if form filling should be allowed by the user.

Returns:
boolean if form filling should be allowed by the user.

setAllowAccessibility

public void setAllowAccessibility(boolean value)
Sets if accessibility programs should be able to read the documents text and images for the user.

Parameters:
value - if accessibility programs should be able to read the documents text and images for the user.

getAllowAccessibility

public boolean getAllowAccessibility()
Gets if accessibility programs should be able to read the documents text and images for the user.

Returns:
boolean if accessibility programs should be able to read the documents text and images for the user.

setAllowDocumentAssembly

public void setAllowDocumentAssembly(boolean value)
Sets if the document can be assembled and manipulated by the user.

Parameters:
value - if the document can be assembled and manipulated by the user.

getAllowDocumentAssembly

public boolean getAllowDocumentAssembly()
Gets if the document can be assembled and manipulated by the user.

Returns:
boolean if the document can be assembled and manipulated by the user.

setAllowHighResolutionPrinting

public void setAllowHighResolutionPrinting(boolean value)
Sets if the document can be printed at a high resolution by the user.

Parameters:
value - if the document can be printed at a high resolution by the user.

getAllowHighResolutionPrinting

public boolean getAllowHighResolutionPrinting()
Gets if the document can be printed at a high resolution by the user.

Returns:
boolean if the document can be printed at a high resolution by the user.

setEncryptMetadata

public void setEncryptMetadata(boolean value)
Sets if the document metadata to be encrypted. Valid only when UseCryptFilter property is true.

Parameters:
value - if the document metadata to be encrypted. Valid only when UseCryptFilter property is true.

getEncryptMetadata

public boolean getEncryptMetadata()
Gets if the document metadata to be encrypted. Valid only when UseCryptFilter property is true.

Returns:
if the document metadata to be encrypted. Valid only when UseCryptFilter property is true.

setUseCryptFilter

public void setUseCryptFilter(boolean value)
Sets if the encryption should be done with crypt filters.

Parameters:
value - if the encryption should be done with crypt filters. The default value is false. If set to true RC4 128 bit encryption is compatible with PDF version 1.5 or higher and can be read with Adobe Acrobat Reader version 6 or higher. Without crypt filter RC4 128 bit encryption is compatible with PDF version 1.4 or higher and can be read with Adobe Acrobat Reader version 5 or higher.

getUseCryptFilter

public boolean getUseCryptFilter()
Gets if the encryption should be done with crypt filters.

Returns:
boolean if the encryption should be done with crypt filters. The default value is false. If set to true RC4 128 bit encryption is compatible with PDF version 1.5 or higher and can be read with Adobe Acrobat Reader version 6 or higher. Without crypt filter RC4 128 bit encryption is compatible with PDF version 1.4 or higher and can be read with Adobe Acrobat Reader version 5 or higher.

getEncrypter

public Encrypter getEncrypter(byte[] id)
Gets a 128 bit Encrypter object to be used for encrypting the document.

Specified by:
getEncrypter in class Security
Parameters:
id - ID of the current PDF document. An Encrypter.
Returns:
An Encrypter.
See Also:
Encrypter

draw

public void draw(DocumentWriter writer,
                 Encrypter encrypter)
Draws the encrypter dictionary to the given DocumentWriter object.

Specified by:
draw in class Security
Parameters:
writer - DocumentWriter object to receive the output.
encrypter - object used to encrypt the document.
See Also:
DocumentWriter, Encrypter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software