A OutlineHandler handles creating outlines for marks. More...
A OutlineHandler handles creating outlines for marks.
A OutlineHandler handles creating outlines for marks. Marks are extracted via interface iText.Html2pdf.Attach.IOutlineMarkExtractor.
This class is not reusable and a new instance shall be created for every new conversion process.
◆ OutlineHandler()
iText.Html2pdf.Attach.Impl.OutlineHandler.OutlineHandler |
( |
|
) |
|
|
inline |
◆ AddOutlineAndDestToDocument()
Adds the outline and the destination.
Adds the outline and the destination. Adds the outline and its corresponding the destination to the PDF document if the priority mapping is set for the element.
-
Parameters
-
tagWorker |
the tag worker |
element |
the element |
context |
the processor context |
-
Returns
-
the outline handler
◆ CreateHandler()
◆ CreateStandardHandler()
◆ GenerateOutlineName()
virtual String iText.Html2pdf.Attach.Impl.OutlineHandler.GenerateOutlineName |
( |
IElementNode |
element |
) |
|
|
inlinepackagevirtual |
Generate the outline name.
Generate the outline name. This method is used in the AddOutlineAndDestToDocument(iText.Html2pdf.Attach.ITagWorker, iText.StyledXmlParser.Node.IElementNode, iText.Html2pdf.Attach.ProcessorContext) method. You can override this method to set your own way to generate the outline names.
-
Parameters
-
-
Returns
-
the unique destination name
◆ GenerateUniqueDestinationName()
virtual String iText.Html2pdf.Attach.Impl.OutlineHandler.GenerateUniqueDestinationName |
( |
IElementNode |
element |
) |
|
|
inlinepackagevirtual |
Generate the unique destination name.
Generate the unique destination name. The destination name is a unique identifier for the outline so it is generated for the outline in the AddOutlineAndDestToDocument(iText.Html2pdf.Attach.ITagWorker, iText.StyledXmlParser.Node.IElementNode, iText.Html2pdf.Attach.ProcessorContext) method. You can override this method to set your own way to generate the destination names, to avoid the destination name conflicts when merging several PDF files created by html2pdf.
-
Parameters
-
-
Returns
-
the unique destination name
◆ GetDestinationNamePrefix()
virtual String iText.Html2pdf.Attach.Impl.OutlineHandler.GetDestinationNamePrefix |
( |
|
) |
|
|
inlinevirtual |
Gets the destination name prefix.
Gets the destination name prefix. The destination name prefix serves as the prefix for the destination names created in the GenerateUniqueDestinationName(iText.StyledXmlParser.Node.IElementNode) method.
-
Returns
-
the destination name prefix
◆ GetMarkExtractor()
Get mark extractor.
-
Returns
-
the mark extractor
◆ GetMarkPriorityMapping()
virtual ? int iText.Html2pdf.Attach.Impl.OutlineHandler.GetMarkPriorityMapping |
( |
String |
markName |
) |
|
|
inlinevirtual |
Gets the mark from priority mapping.
-
Parameters
-
-
Returns
-
the tag priority mapping
◆ HasMarkPriorityMapping()
virtual bool iText.Html2pdf.Attach.Impl.OutlineHandler.HasMarkPriorityMapping |
( |
String |
markName |
) |
|
|
inlinevirtual |
Checks for tag in priority mapping.
-
Parameters
-
-
Returns
-
true, if the tag name is listed in the tag priorities mapping
◆ PutAllMarksPriorityMappings()
Put all marks into priority mappings.
-
Parameters
-
-
Returns
-
the outline handler
◆ PutMarkPriorityMapping()
Put mark into priority mapping.
-
Parameters
-
markName |
the mark name |
priority |
the priority |
-
Returns
-
the outline handler
◆ Reset()
virtual void iText.Html2pdf.Attach.Impl.OutlineHandler.Reset |
( |
|
) |
|
|
inlinevirtual |
Resets the current state so that this OutlineHandler is ready to process new document
◆ SetDestinationNamePrefix()
virtual void iText.Html2pdf.Attach.Impl.OutlineHandler.SetDestinationNamePrefix |
( |
String |
destinationNamePrefix |
) |
|
|
inlinevirtual |
Sets the destination name prefix.
Sets the destination name prefix. The destination name prefix serves as the prefix for the destination names created in the GenerateUniqueDestinationName(iText.StyledXmlParser.Node.IElementNode) method.
-
Parameters
-
destinationNamePrefix |
the destination name prefix |
◆ SetDestinationToElement()
Sets the destination to element.
Sets the destination to element. Sets the destination previously created in the AddOutlineAndDestToDocument(iText.Html2pdf.Attach.ITagWorker, iText.StyledXmlParser.Node.IElementNode, iText.Html2pdf.Attach.ProcessorContext) method to the tag worker element.
-
Parameters
-
tagWorker |
the tag worker |
element |
the element |
-
Returns
-
the outline handler
◆ SetMarkExtractor()
Set mark extractor.
-
Parameters
-
extractor |
the mark extractor |
-
Returns
-
the outline handler
◆ currentOutline
PdfOutline iText.Html2pdf.Attach.Impl.OutlineHandler.currentOutline |
|
package |
◆ destinationsInProcess
LinkedList > iText.Html2pdf.Attach.Impl.OutlineHandler.destinationsInProcess |
|
package |
Initial value:
The destinations in process.
◆ levelsInProcess
LinkedList iText.Html2pdf.Attach.Impl.OutlineHandler.levelsInProcess = new LinkedList() |
|
package |
◆ markExtractor
The mark extractor defines what part of element will be used to create outline