Package com.itextpdf.kernel.pdf
Class ReaderProperties
java.lang.Object
com.itextpdf.kernel.pdf.ReaderProperties
The class representing various properties used to read PDF documents.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Certificate
protected Key
protected String
protected IExternalDecryptionProcess
protected MemoryLimitsAwareHandler
protected byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionsetMemoryLimitsAwareHandler
(MemoryLimitsAwareHandler memoryLimitsAwareHandler) Sets the memory handler which will be used to handle decompressed PDF streams.setPassword
(byte[] password) Defines the password which will be used if the document is encrypted with standard encryption.setPublicKeySecurityParams
(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.setPublicKeySecurityParams
(Certificate certificate, Key certificateKey, 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 Details
-
password
protected byte[] password -
certificateKey
-
certificate
-
certificateKeyProvider
-
externalDecryptionProcess
-
memoryLimitsAwareHandler
-
-
Constructor Details
-
ReaderProperties
public ReaderProperties()Creates an instance ofReaderProperties
.
-
-
Method Details
-
setPassword
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(Certificate certificate, Key certificateKey, 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 identifier -
certificateKey
- the recipient privateKey
to the certificate -
certificateKeyProvider
- the certificate key provider id forSecurity.getProvider(String)
-
externalDecryptionProcess
- the external decryption process to be used - Returns:
-
this
ReaderProperties
instance
-
setPublicKeySecurityParams
public ReaderProperties setPublicKeySecurityParams(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 identifier -
externalDecryptionProcess
- 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
-