' ***********************************************************************
' Author : Elektro
' Modified : 02-20-2014
' ***********************************************************************
' <copyright file="DocumentConverter.vb" company="Elektro Studios">
' Copyright (c) Elektro Studios. All rights reserved.
' </copyright>
' ***********************************************************************
#Region " Example Usages "
' ' HTML 2 RTF
' RichTextBox1.Rtf = HTMLConverter.Html2Rtf(IO.File.ReadAllText("C:\File.htm", System.Text.Encoding.Default),
' SautinSoft.HtmlToRtf.eEncoding.AutoDetect, False,
' DocumentConverter.PageSize.Auto, SautinSoft.HtmlToRtf.ePageNumbers.PageNumFirst,
' "Page {page} of {numpages}", SautinSoft.HtmlToRtf.eAlign.Undefined,
' DocumentConverter.PageOrientation.Auto, "Header", "Footer",
' SautinSoft.HtmlToRtf.eImageCompatible.WordPad)
' ' HTML 2 TXT
' RichTextBox1.Text = HTMLConverter.Html2Txt(IO.File.ReadAllText("C:\File.htm", System.Text.Encoding.Default),
' SautinSoft.HtmlToRtf.eEncoding.AutoDetect, False,
' DocumentConverter.PageSize.Auto, SautinSoft.HtmlToRtf.ePageNumbers.PageNumFirst,
' "Page {page} of {numpages}", SautinSoft.HtmlToRtf.eAlign.Undefined,
' DocumentConverter.PageOrientation.Auto, "Header", "Footer",
' SautinSoft.HtmlToRtf.eImageCompatible.WordPad)
' ' HTML 2 DOC
' Dim MSDocText As String = HTMLConverter.Html2Doc(IO.File.ReadAllText("C:\File.htm", System.Text.Encoding.Default),
' SautinSoft.HtmlToRtf.eEncoding.AutoDetect, False,
' DocumentConverter.PageSize.Auto, SautinSoft.HtmlToRtf.ePageNumbers.PageNumFirst,
' "Page {page} of {numpages}", SautinSoft.HtmlToRtf.eAlign.Undefined,
' DocumentConverter.PageOrientation.Auto, "Header", "Footer",
' SautinSoft.HtmlToRtf.eImageCompatible.MSWord)
' IO.File.WriteAllText("C:\DocFile.doc", MSDocText, System.Text.Encoding.Default)
' ' TXT 2 RTF
' RichTextBox1.Rtf = DocumentConverter.Txt2Rtf("Hello World!",
' SautinSoft.HtmlToRtf.eEncoding.AutoDetect, False,
' DocumentConverter.PageSize.Auto, SautinSoft.HtmlToRtf.ePageNumbers.PageNumFirst,
' "Page {page} of {numpages}", SautinSoft.HtmlToRtf.eAlign.Undefined,
' DocumentConverter.PageOrientation.Auto, "Header", "Footer",
' SautinSoft.HtmlToRtf.eImageCompatible.WordPad)
' ' TXT 2 DOC
' Dim MSDocText As String = DocumentConverter.Txt2Doc("Hello World!",
' SautinSoft.HtmlToRtf.eEncoding.AutoDetect, False,
' DocumentConverter.PageSize.Auto, SautinSoft.HtmlToRtf.ePageNumbers.PageNumFirst,
' "Page {page} of {numpages}", SautinSoft.HtmlToRtf.eAlign.Undefined,
' DocumentConverter.PageOrientation.Auto, "Header", "Footer",
' SautinSoft.HtmlToRtf.eImageCompatible.WordPad)
' IO.File.WriteAllText("C:\DocFile.doc", MSDocText, System.Text.Encoding.Default)
' ' RTF 2 HTML
' Dim HTMLString As String =
' DocumentConverter.Rtf2Html(IO.File.ReadAllText("C:\File.rtf"),
' SautinSoft.RtfToHtml.eOutputFormat.XHTML_10,
' SautinSoft.RtfToHtml.eEncoding.UTF_8,
' True, "C:\")
'
' IO.File.WriteAllText("C:\File.html", HTMLString)
' Process.Start("C:\File.html")
#End Region
#Region " Imports "
Imports SautinSoft
Imports System.Reflection
#End Region
''' <summary>
''' Performs HTML document convertions to other document formats.
''' </summary>
Public Class DocumentConverter
#Region " Enumerations "
''' <summary>
''' Indicates the resulting PageSize.
''' </summary>
Public Enum PageSize
Auto
A3
A4
A5
A6
B5Iso
B5Jis
B6
Executive
Folio
Legal
Letter
Oficio2
Statement
End Enum
''' <summary>
''' Indicates the resulting PageOrientation.
''' </summary>
Public Enum PageOrientation
Auto
Landscape
Portrait
End Enum
#End Region
#Region " Private Methods "
''' <summary>
''' Converts a document using 'SautinSoft.HtmlToRtf' library.
''' </summary>
''' <param name="Text">
''' Indicates the text to convert.
''' </param>
''' <param name="OutputFormat">
''' Indicates the output document format.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="PreservePageBreaks">
''' If set to <c>true</c> page breaks are preserved on the conversion.
''' </param>
''' <param name="PageSize">
''' Indicates the page size.
''' </param>
''' <param name="Pagenumbers">
''' Indicates the page numbers.
''' </param>
''' <param name="PagenumbersFormat">
''' Indicates the page numbers format.
''' </param>
''' <param name="PageAlignment">
''' Indicates the page alignment.
''' </param>
''' <param name="PageOrientation">
''' Indicates the page orientation.
''' </param>
''' <param name="PageHeader">
''' Indicates the page header text.
''' </param>
''' <param name="PageFooter">
''' Indicates the page footer text.
''' </param>
''' <param name="ImageCompatibility">
''' Indicates the image compatibility if the document contains images.
''' RichTexBox control and WordPad can't show jpeg and png images inside RTF, they can show only bitmap images.
''' Microsoft Word can show images in jpeg, png, etc.
''' If this property is set to 'eImageCompatible.WordPad' images will be stored as BMP inside RTF.
''' </param>
''' <returns>System.String.</returns>
Private Shared Function HtmlToRtfConvert(ByVal [Text] As String,
ByVal InputFormat As HtmlToRtf.eInputFormat,
ByVal OutputFormat As HtmlToRtf.eOutputFormat,
Optional ByVal TextEncoding As HtmlToRtf.eEncoding = HtmlToRtf.eEncoding.AutoDetect,
Optional ByVal PreservePageBreaks As Boolean = False,
Optional ByVal PageSize As PageSize = PageSize.Auto,
Optional ByVal Pagenumbers As HtmlToRtf.ePageNumbers = HtmlToRtf.ePageNumbers.PageNumFirst,
Optional ByVal PagenumbersFormat As String = "Page {page} of {numpages}",
Optional ByVal PageAlignment As HtmlToRtf.eAlign = HtmlToRtf.eAlign.Undefined,
Optional ByVal PageOrientation As PageOrientation = PageOrientation.Auto,
Optional ByVal PageHeader As String = Nothing,
Optional ByVal PageFooter As String = Nothing,
Optional ByVal ImageCompatibility As HtmlToRtf.eImageCompatible = HtmlToRtf.eImageCompatible.WordPad) As String
' Set the PageSize.
Dim PerformPageSize As New HtmlToRtf.CPageStyle.CPageSize()
Dim PageSizeMethod As MethodInfo = PerformPageSize.GetType().GetMethod(PageSize.ToString())
' Set the PageOrientation.
Dim PerformPageOrientation As New HtmlToRtf.CPageStyle.CPageOrientation
Dim PageOrientationMethod As MethodInfo = PerformPageOrientation.GetType().GetMethod(PageOrientation.ToString())
' Call the PageSize method.
If Not PageSizeMethod Is Nothing Then
PageSizeMethod.Invoke(PerformPageSize, Nothing)
Else
Throw New Exception(String.Format("PageSize method {0} not found.", PageSize.ToString))
End If
' Call the PageOrientation method.
If Not PageOrientationMethod Is Nothing Then
PageOrientationMethod.Invoke(PerformPageOrientation, Nothing)
Else
Throw New Exception(String.Format("PageOrientation method {0} not found.", PageOrientation.ToString))
End If
' Instance a new document converter.
Dim Converter As New HtmlToRtf
' Customize the conversion options.
With Converter
.Serial = "123456789012"
.InputFormat = InputFormat
.OutputFormat = OutputFormat
.Encoding = TextEncoding
.PreservePageBreaks = PreservePageBreaks
.ImageCompatible = ImageCompatibility
.PageAlignment = PageAlignment
.PageNumbers = Pagenumbers
.PageNumbersFormat = PagenumbersFormat
.PageStyle.PageSize = PerformPageSize
.PageStyle.PageOrientation = PerformPageOrientation
If Not String.IsNullOrEmpty(PageHeader) Then .PageStyle.PageHeader.Text(PageHeader)
If Not String.IsNullOrEmpty(PageFooter) Then .PageStyle.PageFooter.Text(PageFooter)
End With
' Convert it.
Return Converter.ConvertString([Text])
End Function
''' <summary>
''' Converts a document using 'SautinSoft.RtfToHtml' library.
''' </summary>
''' <param name="Text">
''' Indicates the text to convert.
''' </param>
''' <param name="OutputFormat">
''' Indicates the output HTML format.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="SaveImagesToDisk">
''' If set to <c>true</c>, converted images are saved to a directory on hard drive.
''' </param>
''' <param name="ImageFolder">
''' If 'SaveImagesToDisk' parameter is set to 'True', indicates the image directory to save the images.
''' The directory must exist.
''' </param>
''' <returns>System.String.</returns>
Private Shared Function RtfToHtmlConvert(ByVal [Text] As String,
Optional ByVal OutputFormat As RtfToHtml.eOutputFormat = RtfToHtml.eOutputFormat.XHTML_10,
Optional ByVal TextEncoding As RtfToHtml.eEncoding = RtfToHtml.eEncoding.UTF_8,
Optional ByVal SaveImagesToDisk As Boolean = False,
Optional ByVal ImageFolder As String = "C:\") As String
' Instance a new document converter.
Dim Converter As New RtfToHtml
' Customize the conversion options.
With Converter
.Serial = "123456789012"
.OutputFormat = OutputFormat
.Encoding = TextEncoding
.ImageStyle.IncludeImageInHtml = Not SaveImagesToDisk
.ImageStyle.ImageFolder = ImageFolder ' This folder must exist to save the converted images.
.ImageStyle.ImageSubFolder = "Pictures" ' This subfolder will be created by the component to save the images.
.ImageStyle.ImageFileName = "picture" ' Pattern name for converted images. (Ex: 'Picture1.png')
End With
' Convert it.
Return Converter.ConvertString([Text])
End Function
#End Region
#Region " Public Methods "
''' <summary>
''' Converts HTML text to DOC (Microsoft Word).
''' </summary>
''' <param name="HtmlText">
''' Indicates the HTML text to convert.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="PreservePageBreaks">
''' If set to <c>true</c> page breaks are preserved on the conversion.
''' </param>
''' <param name="PageSize">
''' Indicates the page size.
''' </param>
''' <param name="Pagenumbers">
''' Indicates the page numbers.
''' </param>
''' <param name="PagenumbersFormat">
''' Indicates the page numbers format.
''' </param>
''' <param name="PageAlignment">
''' Indicates the page alignment.
''' </param>
''' <param name="PageOrientation">
''' Indicates the page orientation.
''' </param>
''' <param name="PageHeader">
''' Indicates the page header text.
''' </param>
''' <param name="PageFooter">
''' Indicates the page footer text.
''' </param>
''' <param name="ImageCompatibility">
''' Indicates the image compatibility if the document contains images.
''' RichTexBox control and WordPad can't show jpeg and png images inside RTF, they can show only bitmap images.
''' Microsoft Word can show images in jpeg, png, etc.
''' If this property is set to 'eImageCompatible.WordPad' images will be stored as BMP inside RTF.
''' </param>
''' <returns>System.String.</returns>
Public Shared Function Html2Doc(ByVal HtmlText As String,
Optional ByVal TextEncoding As HtmlToRtf.eEncoding = HtmlToRtf.eEncoding.AutoDetect,
Optional ByVal PreservePageBreaks As Boolean = False,
Optional ByVal PageSize As PageSize = PageSize.Auto,
Optional ByVal Pagenumbers As HtmlToRtf.ePageNumbers = HtmlToRtf.ePageNumbers.PageNumFirst,
Optional ByVal PagenumbersFormat As String = "Page {page} of {numpages}",
Optional ByVal PageAlignment As HtmlToRtf.eAlign = HtmlToRtf.eAlign.Undefined,
Optional ByVal PageOrientation As PageOrientation = PageOrientation.Auto,
Optional ByVal PageHeader As String = Nothing,
Optional ByVal PageFooter As String = Nothing,
Optional ByVal ImageCompatibility As HtmlToRtf.eImageCompatible = HtmlToRtf.eImageCompatible.WordPad
) As String
Return HtmlToRtfConvert(HtmlText, HtmlToRtf.eInputFormat.Html, HtmlToRtf.eOutputFormat.Doc, TextEncoding,
PreservePageBreaks, PageSize, Pagenumbers, PagenumbersFormat,
PageAlignment, PageOrientation, PageHeader, PageFooter, ImageCompatibility)
End Function
''' <summary>
''' Converts HTML text to RTF (Rich Text).
''' </summary>
''' <param name="HtmlText">
''' Indicates the HTML text to convert.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="PreservePageBreaks">
''' If set to <c>true</c> page breaks are preserved on the conversion.
''' </param>
''' <param name="PageSize">
''' Indicates the page size.
''' </param>
''' <param name="Pagenumbers">
''' Indicates the page numbers.
''' </param>
''' <param name="PagenumbersFormat">
''' Indicates the page numbers format.
''' </param>
''' <param name="PageAlignment">
''' Indicates the page alignment.
''' </param>
''' <param name="PageOrientation">
''' Indicates the page orientation.
''' </param>
''' <param name="PageHeader">
''' Indicates the page header text.
''' </param>
''' <param name="PageFooter">
''' Indicates the page footer text.
''' </param>
''' <param name="ImageCompatibility">
''' Indicates the image compatibility if the document contains images.
''' RichTexBox control and WordPad can't show jpeg and png images inside RTF, they can show only bitmap images.
''' Microsoft Word can show images in jpeg, png, etc.
''' If this property is set to 'eImageCompatible.WordPad' images will be stored as BMP inside RTF.
''' </param>
''' <returns>System.String.</returns>
Public Shared Function Html2Rtf(ByVal HtmlText As String,
Optional ByVal TextEncoding As HtmlToRtf.eEncoding = HtmlToRtf.eEncoding.AutoDetect,
Optional ByVal PreservePageBreaks As Boolean = False,
Optional ByVal PageSize As PageSize = PageSize.Auto,
Optional ByVal Pagenumbers As HtmlToRtf.ePageNumbers = HtmlToRtf.ePageNumbers.PageNumFirst,
Optional ByVal PagenumbersFormat As String = "Page {page} of {numpages}",
Optional ByVal PageAlignment As HtmlToRtf.eAlign = HtmlToRtf.eAlign.Undefined,
Optional ByVal PageOrientation As PageOrientation = PageOrientation.Auto,
Optional ByVal PageHeader As String = Nothing,
Optional ByVal PageFooter As String = Nothing,
Optional ByVal ImageCompatibility As HtmlToRtf.eImageCompatible = HtmlToRtf.eImageCompatible.WordPad
) As String
Return HtmlToRtfConvert(HtmlText, HtmlToRtf.eInputFormat.Html, HtmlToRtf.eOutputFormat.Rtf, TextEncoding,
PreservePageBreaks, PageSize, Pagenumbers, PagenumbersFormat,
PageAlignment, PageOrientation, PageHeader, PageFooter, ImageCompatibility)
End Function
''' <summary>
''' Converts HTML text to TXT (Plain Text).
''' </summary>
''' <param name="HtmlText">
''' Indicates the HTML text to convert.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="PreservePageBreaks">
''' If set to <c>true</c> page breaks are preserved on the conversion.
''' </param>
''' <param name="PageSize">
''' Indicates the page size.
''' </param>
''' <param name="Pagenumbers">
''' Indicates the page numbers.
''' </param>
''' <param name="PagenumbersFormat">
''' Indicates the page numbers format.
''' </param>
''' <param name="PageAlignment">
''' Indicates the page alignment.
''' </param>
''' <param name="PageOrientation">
''' Indicates the page orientation.
''' </param>
''' <param name="PageHeader">
''' Indicates the page header text.
''' </param>
''' <param name="PageFooter">
''' Indicates the page footer text.
''' </param>
''' <param name="ImageCompatibility">
''' Indicates the image compatibility if the document contains images.
''' RichTexBox control and WordPad can't show jpeg and png images inside RTF, they can show only bitmap images.
''' Microsoft Word can show images in jpeg, png, etc.
''' If this property is set to 'eImageCompatible.WordPad' images will be stored as BMP inside RTF.
''' </param>
''' <returns>System.String.</returns>
Public Shared Function Html2Txt(ByVal HtmlText As String,
Optional ByVal TextEncoding As HtmlToRtf.eEncoding = HtmlToRtf.eEncoding.AutoDetect,
Optional ByVal PreservePageBreaks As Boolean = False,
Optional ByVal PageSize As PageSize = PageSize.Auto,
Optional ByVal Pagenumbers As HtmlToRtf.ePageNumbers = HtmlToRtf.ePageNumbers.PageNumFirst,
Optional ByVal PagenumbersFormat As String = "Page {page} of {numpages}",
Optional ByVal PageAlignment As HtmlToRtf.eAlign = HtmlToRtf.eAlign.Undefined,
Optional ByVal PageOrientation As PageOrientation = PageOrientation.Auto,
Optional ByVal PageHeader As String = Nothing,
Optional ByVal PageFooter As String = Nothing,
Optional ByVal ImageCompatibility As HtmlToRtf.eImageCompatible = HtmlToRtf.eImageCompatible.WordPad
) As String
Return HtmlToRtfConvert(HtmlText, HtmlToRtf.eInputFormat.Html, HtmlToRtf.eOutputFormat.TextAnsi, TextEncoding,
PreservePageBreaks, PageSize, Pagenumbers, PagenumbersFormat,
PageAlignment, PageOrientation, PageHeader, PageFooter, ImageCompatibility)
End Function
''' <summary>
''' Converts TXT to DOC (Microsoft Word).
''' </summary>
''' <param name="Text">
''' Indicates the plain text to convert.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="PreservePageBreaks">
''' If set to <c>true</c> page breaks are preserved on the conversion.
''' </param>
''' <param name="PageSize">
''' Indicates the page size.
''' </param>
''' <param name="Pagenumbers">
''' Indicates the page numbers.
''' </param>
''' <param name="PagenumbersFormat">
''' Indicates the page numbers format.
''' </param>
''' <param name="PageAlignment">
''' Indicates the page alignment.
''' </param>
''' <param name="PageOrientation">
''' Indicates the page orientation.
''' </param>
''' <param name="PageHeader">
''' Indicates the page header text.
''' </param>
''' <param name="PageFooter">
''' Indicates the page footer text.
''' </param>
''' <param name="ImageCompatibility">
''' Indicates the image compatibility if the document contains images.
''' RichTexBox control and WordPad can't show jpeg and png images inside RTF, they can show only bitmap images.
''' Microsoft Word can show images in jpeg, png, etc.
''' If this property is set to 'eImageCompatible.WordPad' images will be stored as BMP inside RTF.
''' </param>
''' <returns>System.String.</returns>
Public Shared Function Txt2Doc(ByVal [Text] As String,
Optional ByVal TextEncoding As HtmlToRtf.eEncoding = HtmlToRtf.eEncoding.AutoDetect,
Optional ByVal PreservePageBreaks As Boolean = False,
Optional ByVal PageSize As PageSize = PageSize.Auto,
Optional ByVal Pagenumbers As HtmlToRtf.ePageNumbers = HtmlToRtf.ePageNumbers.PageNumFirst,
Optional ByVal PagenumbersFormat As String = "Page {page} of {numpages}",
Optional ByVal PageAlignment As HtmlToRtf.eAlign = HtmlToRtf.eAlign.Undefined,
Optional ByVal PageOrientation As PageOrientation = PageOrientation.Auto,
Optional ByVal PageHeader As String = Nothing,
Optional ByVal PageFooter As String = Nothing,
Optional ByVal ImageCompatibility As HtmlToRtf.eImageCompatible = HtmlToRtf.eImageCompatible.WordPad
) As String
Return HtmlToRtfConvert([Text], HtmlToRtf.eInputFormat.Text, HtmlToRtf.eOutputFormat.Doc, TextEncoding,
PreservePageBreaks, PageSize, Pagenumbers, PagenumbersFormat,
PageAlignment, PageOrientation, PageHeader, PageFooter, ImageCompatibility)
End Function
''' <summary>
''' Converts TXT to RTF (Rich Text).
''' </summary>
''' <param name="Text">
''' Indicates the plain text to convert.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="PreservePageBreaks">
''' If set to <c>true</c> page breaks are preserved on the conversion.
''' </param>
''' <param name="PageSize">
''' Indicates the page size.
''' </param>
''' <param name="Pagenumbers">
''' Indicates the page numbers.
''' </param>
''' <param name="PagenumbersFormat">
''' Indicates the page numbers format.
''' </param>
''' <param name="PageAlignment">
''' Indicates the page alignment.
''' </param>
''' <param name="PageOrientation">
''' Indicates the page orientation.
''' </param>
''' <param name="PageHeader">
''' Indicates the page header text.
''' </param>
''' <param name="PageFooter">
''' Indicates the page footer text.
''' </param>
''' <param name="ImageCompatibility">
''' Indicates the image compatibility if the document contains images.
''' RichTexBox control and WordPad can't show jpeg and png images inside RTF, they can show only bitmap images.
''' Microsoft Word can show images in jpeg, png, etc.
''' If this property is set to 'eImageCompatible.WordPad' images will be stored as BMP inside RTF.
''' </param>
''' <returns>System.String.</returns>
Public Shared Function Txt2Rtf(ByVal [Text] As String,
Optional ByVal TextEncoding As HtmlToRtf.eEncoding = HtmlToRtf.eEncoding.AutoDetect,
Optional ByVal PreservePageBreaks As Boolean = False,
Optional ByVal PageSize As PageSize = PageSize.Auto,
Optional ByVal Pagenumbers As HtmlToRtf.ePageNumbers = HtmlToRtf.ePageNumbers.PageNumFirst,
Optional ByVal PagenumbersFormat As String = "Page {page} of {numpages}",
Optional ByVal PageAlignment As HtmlToRtf.eAlign = HtmlToRtf.eAlign.Undefined,
Optional ByVal PageOrientation As PageOrientation = PageOrientation.Auto,
Optional ByVal PageHeader As String = Nothing,
Optional ByVal PageFooter As String = Nothing,
Optional ByVal ImageCompatibility As HtmlToRtf.eImageCompatible = HtmlToRtf.eImageCompatible.WordPad
) As String
Return HtmlToRtfConvert([Text], HtmlToRtf.eInputFormat.Text, HtmlToRtf.eOutputFormat.Rtf, TextEncoding,
PreservePageBreaks, PageSize, Pagenumbers, PagenumbersFormat,
PageAlignment, PageOrientation, PageHeader, PageFooter, ImageCompatibility)
End Function
''' <summary>
''' Converts RtF to HtML.
''' </summary>
''' <param name="RtfText">
''' Indicates the rich text to convert.
''' </param>
''' <param name="OutputFormat">
''' Indicates the output HTML format.
''' </param>
''' <param name="TextEncoding">
''' Indicates the text encoding.
''' </param>
''' <param name="SaveImagesToDisk">
''' If set to <c>true</c>, converted images are saved to a directory on hard drive.
''' </param>
''' <param name="ImageFolder">
''' If 'SaveImagesToDisk' parameter is set to 'True', indicates the image directory to save the images.
''' The directory must exist.
''' </param>
''' <returns>System.String.</returns>
Public Shared Function Rtf2Html(ByVal RtfText As String,
Optional ByVal OutputFormat As RtfToHtml.eOutputFormat = RtfToHtml.eOutputFormat.XHTML_10,
Optional ByVal TextEncoding As RtfToHtml.eEncoding = RtfToHtml.eEncoding.UTF_8,
Optional ByVal SaveImagesToDisk As Boolean = False,
Optional ByVal ImageFolder As String = "C:\") As String
Return RtfToHtmlConvert(RtFText, OutputFormat, TextEncoding, SaveImagesToDisk, ImageFolder)
End Function
#End Region
End Class