Reputation: 369
Maybe someone can help me with the following problem. I have a rich textbox control: RichTxtDescription. I fill the text like:
String _description = “Some text with rft tags like \\ine , \b, \b01 etc.”;
RichTxtDescription.Rft = @"{\rtf1\ansi " + _Description + "\\line \\line Query: \\line .}";
In my winform application, the richtextbox control gets filled as it should be(text with new lines, bolds etc). Now, I want to convert the richTxtDescription.Rft to html tags, to show it on a rtf field what only accepts html tags.
Any suggestions?
Thanks!
Upvotes: 3
Views: 7231
Reputation: 1518
I used this RTF Converter yesterday :) and I am very happy about it.
Add reference to your project and use the following snippet as starting point.
IRtfDocument rtfDocument = RtfInterpreterTool.BuildDoc( yourRtfVariable );
RtfHtmlConverter htmlConverter = new RtfHtmlConverter(rtfDocument);
string html = htmlConverter.Convert();
Upvotes: 9