Class LabelContext
java.lang.Object
com.itextpdf.html2pdf.attach.impl.LabelContext
- All Implemented Interfaces:
-
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the alternate description for the element by id.voidprocess(com.itextpdf.styledxmlparser.node.INode node, int level) Processes a given node to analyze and store potential labels.
-
Constructor Details
-
LabelContext
public LabelContext()Creates new label context.
-
-
Method Details
-
getAltDescription
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:
-
processin interfaceIDocumentTreeJob - Parameters:
-
node- the node to process -
level- the level of the node within the document tree
-