Package com.datalogics.PDFL
Class PDFDict
java.lang.Object
com.datalogics.PDFL.PDFObject
com.datalogics.PDFL.PDFDict
Represents an associative collection of data elements within a PDF document. All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays. PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements, such as PDFInteger, which represents a single integer value. Other subclasses represent a collection of PDFObjects, like PDFArray, an indexed array of data elements.
A PDFDict is a heterogenous collection object that maps other PDFObjects (including other PDFDicts) to PDFName objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether the given key exists in the dictionarybooleanTests whether the given key exists in the dictionaryvoiddelete()Returns the object matching the given key.Returns the object matching the given key string.getKeys()Get a list of all keys in the dictionaryThe XMP metadata associated with this dictionary.voidPuts an object with the matching key into the dictionary, adding the entry if the key is not already present.voidPuts an object with the matching key string into the dictionary, adding the entry if the key is not already present.voidRemoves a key/object pair from the dictionary.voidRemoves a key/object pair from the dictionary.voidsetXMPMetadata(String metadata) The XMP metadata associated with this dictionary.toString()Methods inherited from class com.datalogics.PDFL.PDFObject
clone, clone, clone, clone, clone, compareTo, destroy, enumPDFObjects, equals, getDocument, getGeneration, getID, getIndirect, getPDFHashValue
-
Constructor Details
-
PDFDict
General constructor- Parameters:
doc- Document object containing this PDFDictindirect- flag marking this as an indirect PDFObject
-
PDFDict
General constructor- Parameters:
docFromObj- The new PDFArray will be created in the same document as this object.indirect- flag marking this as an indirect PDFObject
-
-
Method Details
-
delete
public void delete() -
toString
-
get
Returns the object matching the given key.- Parameters:
key- A PDFName for the key- Returns:
- A PDFObject matching the key
-
get
Returns the object matching the given key string.- Parameters:
key- A string representing the name for the key- Returns:
- A PDFObject matching the key
-
put
Puts an object with the matching key into the dictionary, adding the entry if the key is not already present.- Parameters:
key- A PDFName for the keyobj- A PDFObject to add to the dictionary
-
put
Puts an object with the matching key string into the dictionary, adding the entry if the key is not already present.- Parameters:
key- A string representing the name for the keyobj- A PDFObject to add to the dictionary
-
remove
Removes a key/object pair from the dictionary.- Parameters:
key- A PDFName for the key
-
remove
Removes a key/object pair from the dictionary.- Parameters:
key- A string representing the name for the key
-
contains
Tests whether the given key exists in the dictionary- Parameters:
key- A PDFName for the key- Returns:
- true if the given key exists
-
contains
Tests whether the given key exists in the dictionary- Parameters:
key- A string representing the name for the key- Returns:
- true if the given key exists
-
getKeys
Get a list of all keys in the dictionary- Returns:
- a list of all the keys
-
getXMPMetadata
The XMP metadata associated with this dictionary.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.
-
setXMPMetadata
The XMP metadata associated with this dictionary.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.
-