Class LabelContext

java.lang.Object
com.itextpdf.html2pdf.attach.impl.LabelContext
All Implemented Interfaces:
IDocumentTreeJob

public class LabelContext extends Object implements IDocumentTreeJob
This class keeps track of labels attached to applicable elements that present in the document. After elements are proccessed, the DOM tree is scanned and labels are attached to corresponding objects. This object in the ProcessorContext.

This class is not reusable, and a new instance shall be created for every new conversion process.

  • Constructor Details

    • LabelContext

      public LabelContext()
      Creates new label context.
  • Method Details

    • getAltDescription

      public String getAltDescription (String id)
      Gets the alternate description for the element by id.
      Parameters:
      id - id of the element
      Returns:
      alternate description
    • process

      public void process (com.itextpdf.styledxmlparser.node.INode node, int level)
      Processes a given node to analyze and store potential labels.
      Specified by:
      process in interface IDocumentTreeJob
      Parameters:
      node - the node to process
      level - the level of the node within the document tree