Class ReaderProperties


  • public class ReaderProperties
    extends java.lang.Object
    • 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
    • Constructor Detail

      • ReaderProperties

        public 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 recipient Certificate, serves as recipient identifier
        certificateKey - the recipient private Key to the certificate
        certificateKeyProvider - the certificate key provider id for Security.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 recipient Certificate, serves as recipient identifier
        externalDecryptionProcess - the external decryption process to be used
        Returns:
        this ReaderProperties instance
      • clearEncryptionParams

        private void clearEncryptionParams()
      • 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