Class DictionaryObject

java.lang.Object
org.jfree.pdf.internal.PDFObject
org.jfree.pdf.dictionary.DictionaryObject
Direct Known Subclasses:
GraphicsStateDictionary

public class DictionaryObject extends PDFObject
A PDF object that is represented by a dictionary. This is used to represent the Catalog and the Outlines (the latter being a placeholder implementation only since we don't presently generate outlines).
  • Field Details

  • Constructor Details

    • DictionaryObject

      public DictionaryObject(int number, String type)
      Creates a new instance.
      Parameters:
      number - the object number.
      type - the object type (for example, "/Catalog").
  • Method Details

    • put

      public void put(String name, Object value)
      Puts an item in the dictionary.
      Parameters:
      name - the name (without the leading "/", null not permitted).
      value - the value (null not permitted).
    • remove

      public Object remove(String name)
      Removes an item from the dictionary.
      Parameters:
      name - the name (without the leading "/").
      Returns:
      The value that was previously stored with the given name.
    • getObjectBytes

      public byte[] getObjectBytes()
      Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.
      Specified by:
      getObjectBytes in class PDFObject
      Returns:
      A byte array.