Package com.itextpdf.kernel.pdf
Class ReaderProperties
- java.lang.Object
-
- com.itextpdf.kernel.pdf.ReaderProperties
-
public class ReaderProperties extends java.lang.ObjectThe class representing various properties used to read PDF documents.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.security.cert.Certificatecertificateprotected java.security.KeycertificateKeyprotected java.lang.StringcertificateKeyProviderprotected IExternalDecryptionProcessexternalDecryptionProcessprotected MemoryLimitsAwareHandlermemoryLimitsAwareHandlerprotected 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 voidclearEncryptionParams()ReaderPropertiessetMemoryLimitsAwareHandler(MemoryLimitsAwareHandler memoryLimitsAwareHandler)Sets the memory handler which will be used to handle decompressed PDF streams.ReaderPropertiessetPassword(byte[] password)Defines the password which will be used if the document is encrypted with standard encryption.ReaderPropertiessetPublicKeySecurityParams(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.ReaderPropertiessetPublicKeySecurityParams(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
ReaderPropertiesinstance
-
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 privateKeyto the certificatecertificateKeyProvider- the certificate key provider id forSecurity.getProvider(String)externalDecryptionProcess- the external decryption process to be used- Returns:
- this
ReaderPropertiesinstance
-
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
ReaderPropertiesinstance
-
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
ReaderPropertiesinstance
-
clearEncryptionParams
private void clearEncryptionParams()
-
-