Table of Contents

Class GenericNameTree

Namespace
iText.Kernel.Pdf
Assembly
itext.kernel.dll

Abstract representation of a name tree structure, as used in PDF for various purposes such as the Dests tree, the ID tree of structure elements and the embedded file tree.

public class GenericNameTree : IPdfNameTreeAccess
Inheritance
GenericNameTree
Implements
Derived
Inherited Members

Constructors

GenericNameTree(PdfDocument)

Creates a name tree structure in the current document.

protected GenericNameTree(PdfDocument pdfDoc)

Parameters

pdfDoc PdfDocument

the document in which the name tree lives

Methods

AddEntry(string, PdfObject)

Add an entry to the name tree.

public virtual void AddEntry(string key, PdfObject value)

Parameters

key string

key of the entry

value PdfObject

object to add

AddEntry(PdfString, PdfObject)

Add an entry to the name tree.

public virtual void AddEntry(PdfString key, PdfObject value)

Parameters

key PdfString

key of the entry

value PdfObject

object to add

AddEntry(PdfString, PdfObject, Action<PdfDocument>)

Add an entry to the name tree.

protected virtual void AddEntry(PdfString key, PdfObject value, Action<PdfDocument> onErrorAction)

Parameters

key PdfString

key of the entry

value PdfObject

object to add

onErrorAction Action<PdfDocument>

action to perform if such entry exists

BuildTree()

Build a PdfDictionary containing the name tree.

public virtual PdfDictionary BuildTree()

Returns

PdfDictionary

PdfDictionary containing the name tree

GetEntry(string)

public virtual PdfObject GetEntry(string key)

Parameters

key string

Returns

PdfObject

GetEntry(PdfString)

public virtual PdfObject GetEntry(PdfString key)

Parameters

key PdfString

Returns

PdfObject

GetItems()

protected LinkedDictionary<PdfString, PdfObject> GetItems()

Returns

LinkedDictionary<PdfString, PdfObject>

GetKeys()

public virtual ICollection<PdfString> GetKeys()

Returns

ICollection<PdfString>

IsModified()

Check if the tree is modified.

public virtual bool IsModified()

Returns

bool

True if the object has been modified, false otherwise.

ReadTree(PdfDictionary)

Read the entries in a name tree structure from a dictionary object into a linked hash map with fixed order.

protected static LinkedDictionary<PdfString, PdfObject> ReadTree(PdfDictionary dictionary)

Parameters

dictionary PdfDictionary

a dictionary object

Returns

LinkedDictionary<PdfString, PdfObject>

a map containing the entries in the tree

RemoveEntry(PdfString)

Remove an entry from the name tree.

public virtual void RemoveEntry(PdfString key)

Parameters

key PdfString

key of the entry

SetItems(LinkedDictionary<PdfString, PdfObject>)

protected void SetItems(LinkedDictionary<PdfString, PdfObject> items)

Parameters

items LinkedDictionary<PdfString, PdfObject>

SetModified()

Sets the modified flag to true.

public virtual void SetModified()

Remarks

Sets the modified flag to true. It means that the object has been modified.