Interface PdfDict

All Superinterfaces:
PdfObject

public interface PdfDict extends PdfObject
The usage of this interface permit the user to choose the underlying PDF library use to created PDF signatures.
  • Method Details

    • getAsDict

      PdfDict getAsDict(String name)
      Gets an embedded dictionary by name
      Parameters:
      name - String of a dictionary to extract
      Returns:
      PdfDict
    • getAsArray

      PdfArray getAsArray(String name)
      Gets the pdfArray by name
      Parameters:
      name - String
      Returns:
      PdfArray
    • getBinariesValue

      byte[] getBinariesValue(String name) throws IOException
      Gets binaries by dictionary name
      Parameters:
      name - String
      Returns:
      byte array
      Throws:
      IOException - if an exception occurs
    • list

      String[] list()
      Lists all encapsulated dictionary names
      Returns:
      an array of Strings
    • getStringValue

      String getStringValue(String name)
      Gets a string value by property name
      Parameters:
      name - String property name
      Returns:
      String value
    • getNameValue

      String getNameValue(String name)
      Gets a name of the dictionary
      Parameters:
      name - String property name
      Returns:
      String value
    • getDateValue

      Date getDateValue(String name)
      Gets a date
      Parameters:
      name - String property name
      Returns:
      String value
    • getNumberValue

      Number getNumberValue(String name)
      Returns a number value
      Parameters:
      name - String property name
      Returns:
      Number value
    • getObject

      PdfObject getObject(String name)
      Returns a PDF object
      Parameters:
      name - String property name
      Returns:
      PdfObject value
    • getObjectKey

      PdfObjectKey getObjectKey(String name)
      Returns a Pdf object ket of indirect reference to an object, when applicable
      Parameters:
      name - String property name
      Returns:
      PdfObjectKey
    • getStreamBytes

      byte[] getStreamBytes() throws IOException
      Returns object's stream binaries, when available
      Returns:
      byte array
      Throws:
      IOException - if a stream reading exception occurs
    • createRawInputStream

      InputStream createRawInputStream() throws IOException
      Creates a new raw input stream. NOTE: contains raw and not encoded data.
      Returns:
      InputStream
      Throws:
      IOException - if a stream reading exception occurs
    • getRawStreamSize

      long getRawStreamSize() throws IOException
      Returns a size of the raw stream, if present
      Returns:
      size of the raw stream, -1 if not applicable
      Throws:
      IOException - if a stream reading exception occurs
    • setPdfObjectValue

      void setPdfObjectValue(String key, PdfObject pdfObject)
      Sets the Dictionary pdfObject with the given key
      Parameters:
      key - String
      pdfObject - PdfObject
    • setNameValue

      void setNameValue(String key, String value)
      Sets the Name value with the given key
      Parameters:
      key - String
      value - String
    • setStringValue

      void setStringValue(String key, String value)
      Sets the String value with the given key
      Parameters:
      key - String
      value - String
    • setIntegerValue

      void setIntegerValue(String key, Integer value)
      Sets the Integer value with the given key
      Parameters:
      key - String
      value - Integer
    • setDirect

      void setDirect(boolean direct)
      Sets whether the object shall be written directly to its parent
      Parameters:
      direct - whether the object shall be written directly
    • match

      boolean match(PdfDict pdfDict)
      This method verifies if the content of the pdfDict matches the corresponding attributes of the current dictionary. NOTE: this method is different from #equals, as it does not ensure full equality.
      Parameters:
      pdfDict - PdfDict to compare
      Returns:
      TRUE if the content of pdfDict matches, FALSE otherwise