com.spire.pdf
Class PdfSecurityPolicy

java.lang.Object
  extended by com.spire.pdf.PdfSecurityPolicy
Direct Known Subclasses:
PdfPasswordSecurityPolicy

public abstract class PdfSecurityPolicy
extends java.lang.Object

Represents the security policy of the PDF document.


Constructor Summary
PdfSecurityPolicy()
           
 
Method Summary
 PdfDocumentPrivilege getDocumentPrivilege()
          Gets the the document's permission flags.
 PdfEncryptionAlgorithm getEncryptionAlgorithm()
          Gets the encryption algorithm.
 boolean isEncryptMetadata()
          Gets the value indicating whether to encrypt metadata.
 void setDocumentPrivilege(PdfDocumentPrivilege documentPrivilege)
          Sets the document's permission flags
 void setEncryptionAlgorithm(PdfEncryptionAlgorithm encryptionAlgorithm)
          Sets the encryption algorithm.
 void setEncryptMetadata(boolean value)
          Sets the value indicating whether to encrypt metadata.
 

Constructor Detail

PdfSecurityPolicy

public PdfSecurityPolicy()
Method Detail

getEncryptionAlgorithm

public PdfEncryptionAlgorithm getEncryptionAlgorithm()
Gets the encryption algorithm.

Returns:
The document encryption algorithm.

setEncryptionAlgorithm

public void setEncryptionAlgorithm(PdfEncryptionAlgorithm encryptionAlgorithm)
Sets the encryption algorithm.

Parameters:
encryptionAlgorithm - The encryption algorithm.

getDocumentPrivilege

public PdfDocumentPrivilege getDocumentPrivilege()
Gets the the document's permission flags. Default value: All forbidded.

Returns:
The document privilege.

setDocumentPrivilege

public void setDocumentPrivilege(PdfDocumentPrivilege documentPrivilege)
Sets the document's permission flags

Parameters:
documentPrivilege - The document privilege.

isEncryptMetadata

public boolean isEncryptMetadata()
Gets the value indicating whether to encrypt metadata.

Returns:
The value.

setEncryptMetadata

public void setEncryptMetadata(boolean value)
Sets the value indicating whether to encrypt metadata. Note: Only AES_128 and AES_256 encryption algorithm supports unencrypted matadata.

Parameters:
value - The value.