© Copyright SautinSoft 2002 - 2009
(3.0.0 - February 18th, 2009)

Manual for RTF-to-HTML DLL COM
- component to convert Text, RTF strings (files) to HTML, XHTML strings (files).
     about | methods and properties | code samples | rtf samples | order and pricing | license | support and contacts


Methods and properties of the RTF-to-HTML DLL Win32

The component is created with Visual Studio 2005, it is absolutely standalone and doesn't require anything else. The size of component is about only 700 Kb, the average speed of converting is 4 files/per sec without images and 1 file/per sec with images.

The RTF-to-HTML DLL component has a lot of features, which help you to make output HTML as you wish.
This scheme demonstrates all properties and methods, but you may use only some of them, because all properties are already installed by default to make conversion as original.

Methods:
 ConvertFile()
 ConvertString()
 ConvertFileToString()
 
Members:

html parameters:
 Encoding
 FileExtension
 HtmlParts
 OutputFormat
 Title

table parameters:
 TableBorders

image parameters:
 PreserveImages
 
text parameters:
 FontFace
 FontSize
 PreserveFontFace
 PreserveFontSize
color parameters:
 PreserveFontColor
   
   
   
   
   

Methods

int ConvertFile(string rtfFile, string outFolder, string Serial) - this method take RTF (or Text) file and convert it into HTML file.

Return values:
-1 - unexpected error
0 - converting successful
1 - can't open input RTF
2 - can't create output HTML
3 - converting error
4 - can't open input file
5 - the input file has zerow length
6 - wrong serial

string ConvertString(string RTF, string ImageFolder, string ImageSubFolder, string Serial) - this method take RTF (or Text) string and return HTML string.

string ConvertFileToString (string RTF, string ImageFolder, string ImageSubFolder, string Serial) - this method take RTF (or Text) file and return HTML string.

Encoding - endcoding for HTML file

Possible values: Windows_1250, Windows_1251, Windows_1252,
Windows_1253, Windows_1254, Windows_1255, Windows_1256,
Windows_1257, Windows_1258, ISO_8859_1, ISO_8859_2,
ISO_8859_3, ISO_8859_4, ISO_8859_5, ISO_8859_6, ISO_8859_7,
ISO_8859_8, ISO_8859_9, KOI8_R, UTF_8.
Default value: ISO_8859_1

Also you may use integer value:

Name
Integer equivalent
Windows_1250
0
Windows_1251
1
Windows_1252
2
Windows_1253
3
Windows_1254
4
Windows_1255
5
Windows_1256
6
Windows_1257
7
Windows_1258
8
ISO_8859_1
9
ISO_8859_2
10
ISO_8859_3
11
ISO_8859_4
12
ISO_8859_5
13
ISO_8859_6
14
ISO_8859_7
15
ISO_8859_8
16
ISO_8859_9
17
KOI8_R
18
UTF_8
19

FileExtension - extension for HTML file

Possible values: ".htm", ".html", ".asp" etc,
Default value: ".html"
Example: h.FileExtension = ".phtml"

 

HtmlParts - select parts of HTML which need to produce:

Possible values: Html_completely, Html_body.
Also you may use integer value:

Name
Integer equivalent
Html_completely
0
Html_body
1

Default value: Html_completely
Example: h.OutputFormat = RTF2HTML.Html_body

OutputFormat - type of ouput HTML file.

Possible values: Html, Html_with_CSS, Xhtml.
Also you may use integer value:

Name
Integer equivalent
Xhtml
0
Html
1
Html_with_CSS
2

Default value: Html
Example: h.OutputFormat = RTF2HTML.Html_with_CSS

Title - HTML paget title, which appear between tags <title>...</title>

Possible values: Any string.
Default value: "Untitled Document"
Example: h.Title = "First page of site"

FontFace - default font face

Possible values: any font name,
Default value: "Arial"
Example: h.FontFace = "Verdana"

FontSize - default font face

Possible values: from "5" to "72"
Default value: "10"
Example: h.FontSize = "12"

PreserveFontSize - preserve font sizes as in RTF

Possible values: True, False.
Default value: True
Example: h.PreserveFontSize = False
or

TableBorders - visible/invisible table borders, True - visible

Possible values: True, False.
Default value: True
Example: h.TableBorders = False

PreserveImages - if this parameter will be True then images will be preserved.

Possible values: True, False.
Default value: True
Example: h.PreserveImages = False
or

PreserveFontColor - preserve font colors as in RTF

Possible values: True, False.
Default value: True
Example: h.PreserveFontColor = False
or

See examples of using DLL

 

Copyright © 2002-2009, SautinSoft. All rights reserved.