UtilSautinSoftRtf2Html Method
Converts RtF to HtML.
Namespace: DevCase.ThirdParty.SautinSoftsAssembly: DevCase.net48.ThirdParty.SautinSoft (in DevCase.net48.ThirdParty.SautinSoft.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string Rtf2Html(
string rtfText,
Encoding textEncoding = null,
bool saveImagesToDisk = false,
string imageFolder = "C:\"
)
Public Shared Function Rtf2Html (
rtfText As String,
Optional textEncoding As Encoding = Nothing,
Optional saveImagesToDisk As Boolean = false,
Optional imageFolder As String = "C:\"
) As String
Dim rtfText As String
Dim textEncoding As Encoding
Dim saveImagesToDisk As Boolean
Dim imageFolder As String
Dim returnValue As String
returnValue = UtilSautinSoft.Rtf2Html(rtfText,
textEncoding, saveImagesToDisk,
imageFolder)
public:
static String^ Rtf2Html(
String^ rtfText,
Encoding^ textEncoding = nullptr,
bool saveImagesToDisk = false,
String^ imageFolder = L"C:\"
)
static member Rtf2Html :
rtfText : string *
?textEncoding : Encoding *
?saveImagesToDisk : bool *
?imageFolder : string
(* Defaults:
let _textEncoding = defaultArg textEncoding null
let _saveImagesToDisk = defaultArg saveImagesToDisk false
let _imageFolder = defaultArg imageFolder "C:\"
*)
-> string
No code example is currently available or this language may not be supported.
- rtfText String
-
The rich text to convert.
- textEncoding Encoding (Optional)
-
The text encoding.
- saveImagesToDisk Boolean (Optional)
-
If set to , converted images are saved to a directory on hard drive.
- imageFolder String (Optional)
-
The image directory to save the images if saveImagesToDisk parameter is set to .
The directory must exist.
String
The resulting text.
This is a code example.
No code example is currently available or this language may not be supported.
' RTF 2 HTML
Dim htmlString As String =
Rtf2Html(File.ReadAllText("C:\File.rtf"),
RtfToHtml.eOutputFormat.XHTML_10,
RtfToHtml.eEncoding.UTF_8,
True, "C:\")
File.WriteAllText("C:\File.html", htmlString)
Process.Start("C:\File.html")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.