
Visual Basic (Declaration) | |
---|---|
Public Class HtmlConverter |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As HtmlConverter |
C# | |
---|---|
public class HtmlConverter |
Delphi | |
---|---|
public class HtmlConverter |
JScript | |
---|---|
public class HtmlConverter |
Managed Extensions for C++ | |
---|---|
public __gc class HtmlConverter |
C++/CLI | |
---|---|
public ref class HtmlConverter |
Intersoft FlowDocument Framework provides a simple built-in HTML converter that can be used to convert HTML content to FlowDocument format. The built-in HTML converter can translate DIV, P, SPAN, H1, H2, H3, H4, H5, H6, A, BR, OL, UL, LI, TABLE, COL, TR, TD, STRONG, EM, IMG, SUP, and SUB HTML markup. These HTML markup will be converted to the suitable element in FlowDocument.
The built-in HTML converter does not support CSS class definition. It supports inline style definition only. The supported attributes and styles that can be converted are HREF, TARGET, FLOAT, FONT-FAMILY, FONT-SIZE, LIST-STYLE-TYPE, HEIGHT, WIDTH, SRC, MARGIN, PADDING, BORDER, BORDER-STYLE, BORDER-WIDTH, CELLSPACING, CELLPADDING, ROWSPAN, COLSPAN, BORDER-COLOR, COLOR, BACKGROUND-COLOR, and TEXT-ALIGN. Note that the attributes will be ignored if the converted element in FlowDocument does not support the attributes. For example, in the following HTML content, <div style="width: 100px;"/>, the width attribute will be ignored, because the converted element in FlowDocument, which is Section, does not support Width definition.
All colors specified in the HTML should use hexadecimal format. For example: #000000 should be used instead of Black.
The shorthand style format that is supported by the built-in HTML converter are BORDER, MARGIN, and PADDING styles. For example, border: 1px solid #000000, will be translated to Borders="1,Single,#FF000000" and margin: 1px 2px 3px 4px will be translated to Margin="4 3 2 1". The built-in HTML converter does not support individual side definition, thus margin-top, border-top, padding-top, etc are not supported.
Intersoft.Client.Documents.HtmlConverter
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family