Class TagTreeIterator

java.lang.Object
com.itextpdf.kernel.pdf.tagutils.TagTreeIterator

public class TagTreeIterator extends Object
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 Details

    • TagTreeIterator

      public TagTreeIterator (IStructureNode tagTreePointer)
      Creates a new instance of TagTreeIterator.
      Parameters:
      tagTreePointer - the tag tree pointer.
  • Method Details

    • addHandler

      public TagTreeIterator addHandler (ITagTreeIteratorHandler handler)
      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.