pdfHTML 5.0.4 API
iText.Html2pdf.Attach.Impl.DefaultHtmlProcessor Class Reference

The default implementation to process HTML. More...

Inheritance diagram for iText.Html2pdf.Attach.Impl.DefaultHtmlProcessor:
iText.Html2pdf.Attach.IHtmlProcessor

Public Member Functions

  DefaultHtmlProcessor (ConverterProperties converterProperties)
  Instantiates a new default html processor. More...
 
virtual IList< IElement >  ProcessElements (INode root)
  Parses HTML to add the content to a list of iText.Layout.Element.IElement objects. More...
 
virtual Document  ProcessDocument (INode root, PdfDocument pdfDocument)
  Parses HTML to add the content to a iText.Kernel.Pdf.PdfDocument. More...
 

Static Public Member Functions

static void  SetConvertedRootElementProperties (IDictionary< String, String > cssProperties, ProcessorContext context, IPropertyContainer propertyContainer)
  Sets properties to top-level layout elements converted from HTML. More...
 

Detailed Description

The default implementation to process HTML.

Constructor & Destructor Documentation

◆ DefaultHtmlProcessor()

iText.Html2pdf.Attach.Impl.DefaultHtmlProcessor.DefaultHtmlProcessor ( ConverterProperties  converterProperties )
inline

Instantiates a new default html processor.

Parameters
converterProperties the converter properties

Member Function Documentation

◆ ProcessDocument()

virtual Document iText.Html2pdf.Attach.Impl.DefaultHtmlProcessor.ProcessDocument ( INode  root,
PdfDocument  pdfDocument 
)
inlinevirtual

Parses HTML to add the content to a iText.Kernel.Pdf.PdfDocument.

Parameters
root the root node of the HTML that needs to be parsed
pdfDocument the iText.Kernel.Pdf.PdfDocument instance
Returns
a iText.Layout.Document instance

Implements iText.Html2pdf.Attach.IHtmlProcessor.

◆ ProcessElements()

virtual IList iText.Html2pdf.Attach.Impl.DefaultHtmlProcessor.ProcessElements ( INode  root )
inlinevirtual

Parses HTML to add the content to a list of iText.Layout.Element.IElement objects.

Parameters
root the root node of the HTML that needs to be parsed
Returns
the resulting list

Implements iText.Html2pdf.Attach.IHtmlProcessor.

◆ SetConvertedRootElementProperties()

static void iText.Html2pdf.Attach.Impl.DefaultHtmlProcessor.SetConvertedRootElementProperties ( IDictionary< String, String >  cssProperties,
ProcessorContext  context,
IPropertyContainer  propertyContainer 
)
inlinestatic

Sets properties to top-level layout elements converted from HTML.

Sets properties to top-level layout elements converted from HTML. This enables features set by user via HTML converter API and also changes properties defaults to the ones specific to HTML-like behavior.

Parameters
cssProperties HTML document-level css properties.
context processor context specific to the current HTML conversion.
propertyContainer top-level layout element converted from HTML.