Package com.itextpdf.kernel.pdf
Class ReaderProperties
- java.lang.Object
-
- com.itextpdf.kernel.pdf.ReaderProperties
-
public class ReaderProperties extends java.lang.Object
The class representing various properties used to read PDF documents.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.security.cert.Certificate
certificate
protected java.security.Key
certificateKey
protected java.lang.String
certificateKeyProvider
protected IExternalDecryptionProcess
externalDecryptionProcess
protected MemoryLimitsAwareHandler
memoryLimitsAwareHandler
protected byte[]
password
-
Constructor Summary
Constructors Constructor Description ReaderProperties()
Creates an instance ofReaderProperties
.ReaderProperties(ReaderProperties readerProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
clearEncryptionParams()
ReaderProperties
setMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Sets the memory handler which will be used to handle decompressed PDF streams.ReaderProperties
setPassword(byte[] password)
Defines the password which will be used if the document is encrypted with standard encryption.ReaderProperties
setPublicKeySecurityParams(java.security.cert.Certificate certificate, IExternalDecryptionProcess externalDecryptionProcess)
Defines the certificate which will be used if the document is encrypted with public key encryption (see Pdf 1.7 specification, 7.6.4.ReaderProperties
setPublicKeySecurityParams(java.security.cert.Certificate certificate, java.security.Key certificateKey, java.lang.String certificateKeyProvider, IExternalDecryptionProcess externalDecryptionProcess)
Defines the certificate which will be used if the document is encrypted with public key encryption (see Pdf 1.7 specification, 7.6.4.
-
-
-
Field Detail
-
password
protected byte[] password
-
certificateKey
protected java.security.Key certificateKey
-
certificate
protected java.security.cert.Certificate certificate
-
certificateKeyProvider
protected java.lang.String certificateKeyProvider
-
externalDecryptionProcess
protected IExternalDecryptionProcess externalDecryptionProcess
-
memoryLimitsAwareHandler
protected MemoryLimitsAwareHandler memoryLimitsAwareHandler
-
-
Constructor Detail
-
ReaderProperties
public ReaderProperties()
Creates an instance ofReaderProperties
.
-
ReaderProperties
ReaderProperties(ReaderProperties readerProperties)
-
-
Method Detail
-
setPassword
public ReaderProperties setPassword(byte[] password)
Defines the password which will be used if the document is encrypted with standard encryption. This could be either user or owner password.- Parameters:
password
- the password to use in order to open the document- Returns:
- this
ReaderProperties
instance
-
setPublicKeySecurityParams
public ReaderProperties setPublicKeySecurityParams(java.security.cert.Certificate certificate, java.security.Key certificateKey, java.lang.String certificateKeyProvider, IExternalDecryptionProcess externalDecryptionProcess)
Defines the certificate which will be used if the document is encrypted with public key encryption (see Pdf 1.7 specification, 7.6.4. Public-Key Security Handlers)- Parameters:
certificate
- the recipientCertificate
, serves as recipient identifiercertificateKey
- the recipient privateKey
to the certificatecertificateKeyProvider
- the certificate key provider id forSecurity.getProvider(String)
externalDecryptionProcess
- the external decryption process to be used- Returns:
- this
ReaderProperties
instance
-
setPublicKeySecurityParams
public ReaderProperties setPublicKeySecurityParams(java.security.cert.Certificate certificate, IExternalDecryptionProcess externalDecryptionProcess)
Defines the certificate which will be used if the document is encrypted with public key encryption (see Pdf 1.7 specification, 7.6.4. Public-Key Security Handlers)- Parameters:
certificate
- the recipientCertificate
, serves as recipient identifierexternalDecryptionProcess
- the external decryption process to be used- Returns:
- this
ReaderProperties
instance
-
setMemoryLimitsAwareHandler
public ReaderProperties setMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)
Sets the memory handler which will be used to handle decompressed PDF streams.- Parameters:
memoryLimitsAwareHandler
- the memory handler which will be used to handle decompressed PDF streams- Returns:
- this
ReaderProperties
instance
-
clearEncryptionParams
private void clearEncryptionParams()
-
-