Class THTaggingRule

java.lang.Object
com.itextpdf.layout.tagging.THTaggingRule
All Implemented Interfaces:
ITaggingRule

class THTaggingRule extends Object implements ITaggingRule
Used to automatically add scope attribute to TH cells.

This behavior is enabled by default. In the future, we maybe want to expand this with a heuristic which determines the scope based on the position of all the TH cells in the table.

If the scope attribute is already present, it will not be modified. If the scope attribute is not present, it will be added with the value "Column". If the scope attribute is present with the value "None", it will be removed.

  • Constructor Details

    • THTaggingRule

      THTaggingRule()
      Creates a new THTaggingRule instance.
  • Method Details

    • onTagFinish

      public boolean onTagFinish(LayoutTaggingHelper taggingHelper, TaggingHintKey taggingHintKey)
      Action which creates required children structure for the role.
      Specified by:
      onTagFinish in interface ITaggingRule
      Parameters:
      taggingHelper - tagging helper.
      taggingHintKey - element for which children structure will be created.
      Returns:
      true if the structure was created successfully, false otherwise.