Save This Page
Home » iText-src-2.1.3 » com.lowagie » text » pdf » [javadoc | source]
com.lowagie.text.pdf
public class: PdfDictionary [javadoc | source]
java.lang.Object
   com.lowagie.text.pdf.PdfObject
      com.lowagie.text.pdf.PdfDictionary

Direct Known Subclasses:
    PdfPage, PdfAction, PdfCollectionSchema, PdfAcroForm, PdfCollectionSort, PdfMediaClipData, PPKMS, PdfCatalog, PdfSignature, PdfBorderDictionary, PdfOutline, PdfImage, PPKLite, PdfSigGenericPKCS, PdfFormField, PdfStructureElement, PdfOCProperties, PdfRendition, PdfStream, PdfCollection, PdfStructureTreeRoot, PdfGState, PdfContents, StreamFont, PdfFormXObject, PdfLayerMembership, PdfLayer, PdfFileSpecification, PdfTargetDictionary, PdfEFStream, VeriSign, PdfTrailer, PdfPattern, PdfCollectionField, PdfInfo, PdfTransparencyGroup, PdfICCBased, PdfResources, PdfCollectionItem, PdfAnnotation, PdfShadingPattern, PRAcroForm, PRStream

PdfDictionary is the Pdf dictionary object.

A dictionary is an associative table containing pairs of objects. The first element of each pair is called the key and the second element is called the value. Unlike dictionaries in the PostScript language, a key must be a PdfName. A value can be any kind of PdfObject, including a dictionary. A dictionary is generally used to collect and tie together the attributes of a complex object, with each key-value pair specifying the name and value of an attribute.
A dictionary is represented by two left angle brackets (<<), followed by a sequence of key-value pairs, followed by two right angle brackets (>>).
This object is described in the 'Portable Document Format Reference Manual version 1.7' section 3.2.6 (page 59-60).

Field Summary
public static final  PdfName FONT    This is a possible type of dictionary 
public static final  PdfName OUTLINES    This is a possible type of dictionary 
public static final  PdfName PAGE    This is a possible type of dictionary 
public static final  PdfName PAGES    This is a possible type of dictionary 
public static final  PdfName CATALOG    This is a possible type of dictionary 
protected  HashMap hashMap    This is the hashmap that contains all the values and keys of the dictionary 
Fields inherited from com.lowagie.text.pdf.PdfObject:
BOOLEAN,  NUMBER,  STRING,  NAME,  ARRAY,  DICTIONARY,  STREAM,  NULL,  INDIRECT,  NOTHING,  TEXT_PDFDOCENCODING,  TEXT_UNICODE,  bytes,  type,  indRef
Constructor:
 public PdfDictionary() 
 public PdfDictionary(PdfName type) 
    Constructs a PdfDictionary-object of a certain type.
    Parameters:
    type - a PdfName
Method from com.lowagie.text.pdf.PdfDictionary Summary:
contains,   get,   getAsArray,   getAsBoolean,   getAsDict,   getAsIndirectObject,   getAsName,   getAsNumber,   getAsStream,   getAsString,   getDirectObject,   getKeys,   isCatalog,   isFont,   isOutlineTree,   isPage,   isPages,   merge,   mergeDifferent,   put,   putAll,   putEx,   remove,   size,   toPdf,   toString
Methods from com.lowagie.text.pdf.PdfObject:
canBeInObjStm,   getBytes,   getIndRef,   isArray,   isBoolean,   isDictionary,   isIndirect,   isName,   isNull,   isNumber,   isStream,   isString,   length,   setContent,   setIndRef,   toPdf,   toString,   type
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.lowagie.text.pdf.PdfDictionary Detail:
 public boolean contains(PdfName key) 
 public PdfObject get(PdfName key) 
    Gets a PdfObject with a certain key from the PdfDictionary.
 public PdfArray getAsArray(PdfName key) 
 public PdfBoolean getAsBoolean(PdfName key) 
 public PdfDictionary getAsDict(PdfName key) 
    All the getAs functions will return either null, or the specified object type This function will automatically look up indirect references. There's one obvious exception, the one that will only return an indirect reference. All direct objects come back as a null. Mark A Storer (2/17/06)
 public PdfIndirectReference getAsIndirectObject(PdfName key) 
 public PdfName getAsName(PdfName key) 
 public PdfNumber getAsNumber(PdfName key) 
 public PdfStream getAsStream(PdfName key) 
 public PdfString getAsString(PdfName key) 
 public PdfObject getDirectObject(PdfName key) 
    This function behaves the same as 'get', but will never return an indirect reference, it will always look such references up and return the actual object.
 public Set getKeys() 
 public boolean isCatalog() 
    Checks if a Dictionary is of the type CATALOG.
 public boolean isFont() 
    Checks if a Dictionary is of the type FONT.
 public boolean isOutlineTree() 
    Checks if a Dictionary is of the type OUTLINES.
 public boolean isPage() 
    Checks if a Dictionary is of the type PAGE.
 public boolean isPages() 
    Checks if a Dictionary is of the type PAGES.
 public  void merge(PdfDictionary other) 
 public  void mergeDifferent(PdfDictionary other) 
 public  void put(PdfName key,
    PdfObject value) 
    Adds a PdfObject and its key to the PdfDictionary. If the value is null or PdfNull the key is deleted.
 public  void putAll(PdfDictionary dic) 
 public  void putEx(PdfName key,
    PdfObject value) 
    Adds a PdfObject and its key to the PdfDictionary. If the value is null it does nothing.
 public  void remove(PdfName key) 
    Removes a PdfObject and its key from the PdfDictionary.
 public int size() 
 public  void toPdf(PdfWriter writer,
    OutputStream os) throws IOException 
    Returns the PDF representation of this PdfDictionary.
 public String toString()