public class DefaultHtmlProcessor extends Object implements IHtmlProcessor
Constructor and Description |
---|
DefaultHtmlProcessor(ConverterProperties converterProperties)
Instantiates a new default html processor.
|
Modifier and Type | Method and Description |
---|---|
com.itextpdf.layout.Document |
processDocument(com.itextpdf.styledxmlparser.node.INode root, com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
Parses HTML to add the content to a PdfDocument .
|
List |
processElements(com.itextpdf.styledxmlparser.node.INode root)
Parses HTML to add the content to a list of IElement objects.
|
static void |
setConvertedRootElementProperties(Map<String,String> cssProperties, ProcessorContext context, com.itextpdf.layout.IPropertyContainer propertyContainer)
Sets properties to top-level layout elements converted from HTML.
|
public DefaultHtmlProcessor(ConverterProperties converterProperties)
converterProperties
- the converter properties
public static void setConvertedRootElementProperties(Map<String,String> cssProperties, ProcessorContext context, com.itextpdf.layout.IPropertyContainer propertyContainer)
cssProperties
- HTML document-level css properties.
context
- processor context specific to the current HTML conversion.
propertyContainer
- top-level layout element converted from HTML.
public ListprocessElements(com.itextpdf.styledxmlparser.node.INode root)
IHtmlProcessor
IElement
objects.
processElements
in interface IHtmlProcessor
root
- the root node of the HTML that needs to be parsed
public com.itextpdf.layout.Document processDocument(com.itextpdf.styledxmlparser.node.INode root, com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
IHtmlProcessor
PdfDocument
.
processDocument
in interface IHtmlProcessor
root
- the root node of the HTML that needs to be parsed
pdfDocument
- the PdfDocument
instance
Document
instance
Copyright © 1998–2021 iText Group NV. All rights reserved.