public class Dictionary extends PDFObject
Dictionary
represents a dictionary object in pdf document.
It can be constructed by the following way:
Example:
Dictionary dict = Dictionary.create(doc);
Modifier and Type | Method and Description |
---|---|
static Dictionary |
create(PDFDocument doc)
Create a dictionary object.
|
int |
getInteger(java.lang.String key)
Get an integer value from dictionary.
|
void |
setAtInteger(java.lang.String key,
int number)
Set an integer value to specific key in dictionary.
|
public static Dictionary create(PDFDocument doc) throws PDFException
doc
- A PDFDocument
object which is a PDF document. It
should be valid.Dictionary
object that receives the dictionary
object newly created.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
PDFDocument
public void setAtInteger(java.lang.String key, int number) throws PDFException
key
- The key of the value to set, and it should be valid string.number
- An integer value associated with key
.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public int getInteger(java.lang.String key) throws PDFException
key
- The key of the value to set, and it should be valid string.key
.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException