Converting from RTF to HTML and HTML to RTF

A while back I posted Converting RTF to HTML which showed how to convert RTF text into HTML markup using the WPF RichTextBox control.  Since then I have noticed many posts on forums asking for a free and easy way to go the other way: convert from HTML to RTF. This is actually a very straightforward modification to my original code.

I posted an updated article and the complete sample code for this at Converting between RTF and HTML on the Code Samples Gallery.

This entry was posted in C#, HTML, RTF, WPF, XAML. Bookmark the permalink.

6 Responses to Converting from RTF to HTML and HTML to RTF

  1. josey oommen says:

    how to do same thing in C# VS 2005.

  2. Andy_Luu says:

    Hi Matthew ! this Article is Nice , but I don’t use it for Metro App Windows 8
    How can I do ?

  3. Dave says:

    Hi, this appears to work but it doesn’t seem to respect the CSS, inline or referenced.

  4. John says:

    Great Job, but It doesn’t work when td havnt width.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>