iText 8.0.5 API
iText.Kernel.Pdf.GenericNameTree Class Reference

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. More...

Inheritance diagram for iText.Kernel.Pdf.GenericNameTree:
iText.Kernel.Pdf.IPdfNameTreeAccess iText.Kernel.Pdf.PdfNameTree iText.Kernel.Pdf.Tagging.PdfStructIdTree

Public Member Functions

virtual void  AddEntry (PdfString key, PdfObject value)
  Add an entry to the name tree. More...
 
virtual void  AddEntry (String key, PdfObject value)
  Add an entry to the name tree. More...
 
virtual void  RemoveEntry (PdfString key)
  Remove an entry from the name tree. More...
 
virtual PdfObject  GetEntry (PdfString key)
  Retrieve an entry from the name tree. More...
 
virtual PdfObject  GetEntry (String key)
  Retrieve an entry from the name tree. More...
 
virtual ICollection< PdfString GetKeys ()
  Retrieve the set of keys in the name tree. More...
 
virtual bool  IsModified ()
  Check if the tree is modified. More...
 
virtual void  SetModified ()
  Sets the modified flag to true. More...
 
virtual PdfDictionary  BuildTree ()
  Build a PdfDictionary containing the name tree. More...
 

Package Functions

  GenericNameTree (PdfDocument pdfDoc)
  Creates a name tree structure in the current document. More...
 
virtual void  AddEntry (PdfString key, PdfObject value, Action< PdfDocument > onErrorAction)
  Add an entry to the name tree. More...
 
void  SetItems (LinkedDictionary< PdfString, PdfObject > items)
 
LinkedDictionary< PdfString, PdfObject GetItems ()
 

Static Package Functions

static LinkedDictionary< PdfString, PdfObject ReadTree (PdfDictionary dictionary)
  Read the entries in a name tree structure from a dictionary object into a linked hash map with fixed order. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GenericNameTree()

iText.Kernel.Pdf.GenericNameTree.GenericNameTree ( PdfDocument  pdfDoc )
inlinepackage

Creates a name tree structure in the current document.

Parameters
pdfDoc the document in which the name tree lives

Member Function Documentation

◆ AddEntry() [1/3]

virtual void iText.Kernel.Pdf.GenericNameTree.AddEntry ( PdfString  key,
PdfObject  value 
)
inlinevirtual

Add an entry to the name tree.

Parameters
key key of the entry
value object to add

Reimplemented in iText.Kernel.Pdf.Tagging.PdfStructIdTree.

◆ AddEntry() [2/3]

virtual void iText.Kernel.Pdf.GenericNameTree.AddEntry ( PdfString  key,
PdfObject  value,
Action< PdfDocument onErrorAction 
)
inlinepackagevirtual

Add an entry to the name tree.

Parameters
key key of the entry
value object to add
onErrorAction action to perform if such entry exists

◆ AddEntry() [3/3]

virtual void iText.Kernel.Pdf.GenericNameTree.AddEntry ( String  key,
PdfObject  value 
)
inlinevirtual

Add an entry to the name tree.

Parameters
key key of the entry
value object to add

◆ BuildTree()

virtual PdfDictionary iText.Kernel.Pdf.GenericNameTree.BuildTree ( )
inlinevirtual

Build a PdfDictionary containing the name tree.

Returns

PdfDictionary containing the name tree

◆ GetEntry() [1/2]

virtual PdfObject iText.Kernel.Pdf.GenericNameTree.GetEntry ( PdfString  key )
inlinevirtual

Retrieve an entry from the name tree.

Implements iText.Kernel.Pdf.IPdfNameTreeAccess.

◆ GetEntry() [2/2]

virtual PdfObject iText.Kernel.Pdf.GenericNameTree.GetEntry ( String  key )
inlinevirtual

Retrieve an entry from the name tree.

Implements iText.Kernel.Pdf.IPdfNameTreeAccess.

◆ GetKeys()

virtual ICollection<PdfString> iText.Kernel.Pdf.GenericNameTree.GetKeys ( )
inlinevirtual

Retrieve the set of keys in the name tree.

Returns
set of all keys in the name tree

Implements iText.Kernel.Pdf.IPdfNameTreeAccess.

◆ IsModified()

virtual bool iText.Kernel.Pdf.GenericNameTree.IsModified ( )
inlinevirtual

Check if the tree is modified.

Returns
True if the object has been modified, false otherwise.

◆ ReadTree()

static LinkedDictionary<PdfString, PdfObject> iText.Kernel.Pdf.GenericNameTree.ReadTree ( PdfDictionary  dictionary )
inlinestaticpackage

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

Parameters
dictionary a dictionary object
Returns
a map containing the entries in the tree

◆ RemoveEntry()

virtual void iText.Kernel.Pdf.GenericNameTree.RemoveEntry ( PdfString  key )
inlinevirtual

Remove an entry from the name tree.

Parameters
key key of the entry

◆ SetModified()

virtual void iText.Kernel.Pdf.GenericNameTree.SetModified ( )
inlinevirtual

Sets the modified flag to true.

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