public class PDFDict extends PDFObject
A PDFDict is a heterogenous collection object that maps other PDFObjects (including other PDFDicts) to PDFName objects.
| Constructor and Description |
|---|
PDFDict(Document doc,
boolean indirect)
General constructor
|
PDFDict(PDFObject docFromObj,
boolean indirect)
General constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(PDFName key)
Tests whether the given key exists in the dictionary
|
boolean |
contains(java.lang.String key)
Tests whether the given key exists in the dictionary
|
void |
delete() |
PDFObject |
get(PDFName key)
Returns the object matching the given key.
|
PDFObject |
get(java.lang.String key)
Returns the object matching the given key string.
|
java.util.List<PDFObject> |
getKeys()
Get a list of all keys in the dictionary
|
java.lang.String |
getXMPMetadata()
The XMP metadata associated with this dictionary.
|
void |
put(PDFName key,
PDFObject obj)
Puts an object with the matching key into the dictionary, adding the entry if the key is not already present.
|
void |
put(java.lang.String key,
PDFObject obj)
Puts an object with the matching key string into the dictionary, adding the entry if the key is not already present.
|
void |
remove(PDFName key)
Removes a key/object pair from the dictionary.
|
void |
remove(java.lang.String key)
Removes a key/object pair from the dictionary.
|
void |
setXMPMetadata(java.lang.String metadata)
The XMP metadata associated with this dictionary.
|
java.lang.String |
toString() |
clone, clone, clone, clone, clone, compareTo, destroy, enumPDFObjects, equals, getDocument, getGeneration, getID, getIndirect, getPDFHashValuepublic PDFDict(Document doc, boolean indirect)
doc - Document object containing this PDFDictindirect - flag marking this as an indirect PDFObjectpublic PDFDict(PDFObject docFromObj, boolean indirect)
docFromObj - The new PDFArray will be created in the same document as this object.indirect - flag marking this as an indirect PDFObjectpublic PDFObject get(PDFName key)
key - A PDFName for the keypublic PDFObject get(java.lang.String key)
key - A string representing the name for the keypublic void put(PDFName key, PDFObject obj)
key - A PDFName for the keyobj - A PDFObject to add to the dictionarypublic void put(java.lang.String key,
PDFObject obj)
key - A string representing the name for the keyobj - A PDFObject to add to the dictionarypublic void remove(PDFName key)
key - A PDFName for the keypublic void remove(java.lang.String key)
key - A string representing the name for the keypublic boolean contains(PDFName key)
key - A PDFName for the keypublic boolean contains(java.lang.String key)
key - A string representing the name for the keypublic java.util.List<PDFObject> getKeys()
public java.lang.String getXMPMetadata()
NULL if there is no such data.
Note: PDFL will not attempt to verify that obj is one of the objects specified to allow XMP metadata by the PDF reference.
public void setXMPMetadata(java.lang.String metadata)
NULL if there is no such data.
Note: PDFL will not attempt to verify that obj is one of the objects that is specified in the PDF reference to allow XMP metadata.