RtfConverter
public static class RtfConverterRTF to the HTML subset of
TextMarkup.Html, e.g. text written with a WinForms/WPF RichTextBox or WordPad: item.Text = RtfConverter.ToHtml(rtf); item.Markup = TextMarkup.Html;- Character formatting:
\b \i \ul \ulnone \strike \fs(size),\f(font table → font-family),\cf(colour table → color),\highlight/\cb(→ mark),\plain; paragraph:\par \line \pard \ql \qc \qr \qj,\tab(a space). - Styles of the style sheet (
\sN,\csN) apply their character formatting. - Text:
\'hhin the document code page (\ansicpg, default 1252),\uNwith its fallback skipped (\ucN),\~ \- \_, escaped braces and backslashes. - Ignored: pictures, fields' instructions, other destinations (
\*), and right-to-left text direction (\rtlpar,\rtlch) – the rich text layout runs left to right.
Methods
| Method Signature | Returns | Description |
|---|---|---|
static # ToHtml(string rtf) | string | Converts RTF to HTML for TextMarkup.Html (see the class remarks for what is kept). |

