How to convert rtf to html in window application???
pls Help Me code and send me email:[email protected]
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Selva GanapathyRank #560 · 4.3K reputationPosted Nov 28, 2014, 12:18 AM EST
Hi Imran Pathan,
I with technology you want, I mean WinForm or WPF?
Regards,
Selva Ganapathy K
Tom Tiziano2 reputationPosted Dec 4, 2014, 4:03 AM EST
I hope this helps.
Lorine Appleby38 reputationPosted Jan 5, 2015, 1:10 AM EST
https://code.msdn.microsoft.com/Word-Document-Editor-in-d97fd70b
https://code.msdn.microsoft.com/Word-Document-Editor-in-926f019d
They are samples of document editors that use this Word processing component in C#, one for Windows Forms and one for WPF application. In short the samples show how you can manipulate with RTF content in C#, you can use that approach to convert that content to a HTML file or a stream or a string, whatever you need.
For example here is a simple straightforward conversion from one format into another:
DocumentModel.Load("Sample.rtf", LoadOptions.RtfDefault)
.Save("Sample.html", SaveOptions.HtmlDefault);
shi lianghong48 reputationPosted Jan 5, 2015, 7:52 PM EST
// ---------------------------------------------------------------------- private static string ConvertRtfToHtml( string rtfText ){ IRtfDocument rtfDocument = RtfInterpreterTool.BuildDoc( rtfText ); RtfHtmlConvertSettings settings = newRtfHtmlConvertSettings(); settings.ConvertScope = RtfHtmlConvertScope.Content; RtfHtmlConverter htmlConverter =new RtfHtmlConverter( rtfDocument, settings ); return htmlConverter.Convert(); } // ConvertRtfToHtml
Google out:
https://code.msdn.microsoft.com/windowsdesktop/Converting-between-RTF-and-aaa02a6e
http://stackoverflow.com/questions/439301/convert-rtf-to-html
http://blogs.msdn.com/b/matt/archive/2009/09/28/converting-rtf-to-html.aspx