Package com.itextpdf.kernel.pdf.tagutils
Class TagTreeIterator
java.lang.Object
com.itextpdf.kernel.pdf.tagutils.TagTreeIterator
This class is used to traverse the tag tree.
There is a possibility to add a handler that will be called for specific events during the traversal.
-
Constructor Summary
ConstructorDescriptionTagTreeIterator
(IStructureNode tagTreePointer) Creates a new instance ofTagTreeIterator
. -
Method Summary
Modifier and TypeMethodDescriptionaddHandler
(ITagTreeIteratorHandler handler) Adds a handler that will be called for specific events during the traversal.void
traverse()
Traverses the tag tree in the order of the document structure.
-
Constructor Details
-
TagTreeIterator
Creates a new instance ofTagTreeIterator
.- Parameters:
-
tagTreePointer
- the tag tree pointer.
-
-
Method Details
-
addHandler
Adds a handler that will be called for specific events during the traversal.- Parameters:
-
handler
- the handler. - Returns:
-
this
TagTreeIterator
instance.
-
traverse
public void traverse()Traverses the tag tree in the order of the document structure.Make sure the correct handlers are added before calling this method.
-