Intersoft ClientUI Documentation
HtmlConverter Class
Members  See Also  Send Feedback
Intersoft.Client.Documents Namespace : HtmlConverter Class






Represent a converter which convert string object to FlowDocument object.

Object Model

HtmlConverter Class

Syntax

Visual Basic (Declaration) 
Public Class HtmlConverter 
Visual Basic (Usage)Copy Code
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 

Remarks

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.

Inheritance Hierarchy

System.Object
   Intersoft.Client.Documents.HtmlConverter

Requirements

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

See Also

© 2012 All Rights Reserved.