Class PdfDictionary
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
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.3' section 4.7 (page 40-41). @see PdfObject @see PdfName @see BadPdfFormatException
public class PdfDictionary : PdfObject
- Inheritance
-
PdfDictionary
- Derived
- Inherited Members
Constructors
PdfDictionary()
constructors
public PdfDictionary()
PdfDictionary(PdfName)
Constructs a PdfDictionary -object of a certain type.
public PdfDictionary(PdfName type)
Parameters
type
PdfNamea PdfName
Fields
Catalog
static membervariables (types of dictionary's)
public static PdfName Catalog
Field Value
Font
This is a possible type of dictionary
public static PdfName Font
Field Value
HashMap
membervariables
protected INullValueDictionary<PdfName, PdfObject> HashMap
Field Value
Outlines
This is a possible type of dictionary
public static PdfName Outlines
Field Value
Page
This is a possible type of dictionary
public static PdfName Page
Field Value
Pages
This is a possible type of dictionary
public static PdfName Pages
Field Value
Properties
Keys
methods overriding some methods in PdfObject
public ICollection<PdfName> Keys { get; }
Property Value
Size
public int Size { get; }
Property Value
Methods
Contains(PdfName)
public bool Contains(PdfName key)
Parameters
key
PdfName
Returns
Get(PdfName)
public PdfObject Get(PdfName key)
Parameters
key
PdfName
Returns
GetAsArray(PdfName)
public PdfArray GetAsArray(PdfName key)
Parameters
key
PdfName
Returns
GetAsBoolean(PdfName)
public PdfBoolean GetAsBoolean(PdfName key)
Parameters
key
PdfName
Returns
GetAsDict(PdfName)
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 PdfDictionary GetAsDict(PdfName key)
Parameters
key
PdfName
Returns
- PdfDictionary
the appropriate object in its final type, or null
GetAsIndirectObject(PdfName)
public PdfIndirectReference GetAsIndirectObject(PdfName key)
Parameters
key
PdfName
Returns
GetAsName(PdfName)
public PdfName GetAsName(PdfName key)
Parameters
key
PdfName
Returns
GetAsNumber(PdfName)
public PdfNumber GetAsNumber(PdfName key)
Parameters
key
PdfName
Returns
GetAsStream(PdfName)
public PdfStream GetAsStream(PdfName key)
Parameters
key
PdfName
Returns
GetAsString(PdfName)
public PdfString GetAsString(PdfName key)
Parameters
key
PdfName
Returns
GetDirectObject(PdfName)
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 PdfObject GetDirectObject(PdfName key)
Parameters
key
PdfName
Returns
- PdfObject
null, or a non-indirect object
GetEnumerator()
public virtual IEnumerator<KeyValuePair<PdfName, PdfObject>> GetEnumerator()
Returns
IsCatalog()
public bool IsCatalog()
Returns
IsFont()
public bool IsFont()
Returns
IsOutlineTree()
public bool IsOutlineTree()
Returns
IsPage()
public bool IsPage()
Returns
IsPages()
public bool IsPages()
Returns
Merge(PdfDictionary)
Checks if a Dictionary is of the type FONT.
public void Merge(PdfDictionary other)
Parameters
other
PdfDictionary
MergeDifferent(PdfDictionary)
methods concerning the type of Dictionary
public void MergeDifferent(PdfDictionary other)
Parameters
other
PdfDictionary
Put(PdfName, PdfObject)
public void Put(PdfName key, PdfObject value)
Parameters
PutEx(PdfName, PdfObject)
Adds a PdfObject and its key to the PdfDictionary . If the value is null it does nothing.
public void PutEx(PdfName key, PdfObject value)
Parameters
Remove(PdfName)
public void Remove(PdfName key)
Parameters
key
PdfName
ToPdf(PdfWriter, Stream)
Returns the PDF representation of this PdfDictionary .
public override void ToPdf(PdfWriter writer, Stream os)
Parameters
ToString()
public override string ToString()