Class PDCryptFilterDictionary

  • All Implemented Interfaces:
    com.pd4ml.pdf.parser.obj.Obj

    public class PDCryptFilterDictionary
    extends com.pd4ml.pdf.parser.obj.DictObject
    This class is a specialized view of the crypt filter dictionary of a PDF document. It contains a low level dictionary (DictObject) and provides the methods to manage its fields.
    • Field Summary

      • Fields inherited from class com.pd4ml.pdf.parser.obj.DictObject

        entries
      • Fields inherited from class com.pd4ml.pdf.parser.obj.PdfObject

        id, touched, xref
      • Fields inherited from interface com.pd4ml.pdf.parser.obj.Obj

        ARRAY, BOOL, CMD, DICT, EOF, ID, INDIRECT, INT, NAME, NEWSTREAM, NULL, REAL, REF, STREAM, STRING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pd4ml.pdf.parser.obj.Name getCryptFilterMethod()
      This will return the crypt filter method.
      int getLength()
      This will return the Length entry of the crypt filter dictionary.

      The length in bits for the crypt filter algorithm.
      boolean isEncryptMetaData()
      Will get the EncryptMetaData dictionary info.
      void setCryptFilterMethod​(java.lang.String cfm)
      This will set the crypt filter method.
      void setEncryptMetaData​(boolean encryptMetaData)
      Set the EncryptMetaData dictionary info.
      void setLength​(int length)
      This will set the number of bits to use for the crypt filter algorithm.
      • Methods inherited from class com.pd4ml.pdf.parser.obj.DictObject

        addAll, addEntry, assignXref, equals, get, get, get, getInt, getInt, getObject, getPageObjects, getType, has, isEmpty, remove, set, setToBeWritten, toString, touch, values, write
      • Methods inherited from class com.pd4ml.pdf.parser.obj.Dict

        getDict, hasStream, reassignParents, setStream
      • Methods inherited from class com.pd4ml.pdf.parser.obj.PdfObject

        resolveReferences, storeOffset
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PDCryptFilterDictionary

        public PDCryptFilterDictionary​(com.pd4ml.pdf.parser.Objects xref)
      • PDCryptFilterDictionary

        public PDCryptFilterDictionary​(com.pd4ml.pdf.parser.obj.DictObject dict)
    • Method Detail

      • setLength

        public void setLength​(int length)
        This will set the number of bits to use for the crypt filter algorithm.
        Parameters:
        length - The new key length.
      • getLength

        public int getLength()
        This will return the Length entry of the crypt filter dictionary.

        The length in bits for the crypt filter algorithm. This will return a multiple of 8.
        Returns:
        The length in bits for the encryption algorithm
      • setCryptFilterMethod

        public void setCryptFilterMethod​(java.lang.String cfm)
        This will set the crypt filter method. Allowed values are: NONE, V2, AESV2, AESV3
        Parameters:
        cfm - name of the crypt filter method.
      • getCryptFilterMethod

        public com.pd4ml.pdf.parser.obj.Name getCryptFilterMethod()
        This will return the crypt filter method. Allowed values are: NONE, V2, AESV2, AESV3
        Returns:
        the name of the crypt filter method.
      • isEncryptMetaData

        public boolean isEncryptMetaData()
        Will get the EncryptMetaData dictionary info.
        Returns:
        true if EncryptMetaData is explicitly set (the default is true)
      • setEncryptMetaData

        public void setEncryptMetaData​(boolean encryptMetaData)
        Set the EncryptMetaData dictionary info.
        Parameters:
        encryptMetaData - true if EncryptMetaData shall be set.