Class GenericNameTree
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
PdfDocumentthe 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
AddEntry(PdfString, PdfObject)
Add an entry to the name tree.
public virtual void AddEntry(PdfString key, PdfObject value)
Parameters
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
PdfStringkey of the entry
value
PdfObjectobject 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
GetEntry(PdfString)
public virtual PdfObject GetEntry(PdfString key)
Parameters
key
PdfString
Returns
GetItems()
protected LinkedDictionary<PdfString, PdfObject> GetItems()
Returns
GetKeys()
public virtual ICollection<PdfString> GetKeys()
Returns
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
PdfDictionarya dictionary object
Returns
RemoveEntry(PdfString)
Remove an entry from the name tree.
public virtual void RemoveEntry(PdfString key)
Parameters
key
PdfStringkey of the entry
SetItems(LinkedDictionary<PdfString, PdfObject>)
protected void SetItems(LinkedDictionary<PdfString, PdfObject> items)
Parameters
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.