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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
shi lianghongPosted Jan 6, 2015, 12:52 AM
// ---------------------------------------------------------------------- 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
Lorine ApplebyPosted Jan 5, 2015, 6:10 AM
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);
Tom TizianoPosted Dec 4, 2014, 9:03 AM
I hope this helps.
Selva GanapathyPosted Nov 28, 2014, 5:18 AM
Hi Imran Pathan,
I with technology you want, I mean WinForm or WPF?
Regards,
Selva Ganapathy K