I have the following code to convert rtf text to html:
private string RtfToHtml(string rtf)
{
IRtfDocument rtfDocument = RtfInterpreterTool.BuildDoc(rtf);
RtfHtmlConverter htmlConverter = new RtfHtmlConverter(rtfDocument);
return htmlConverter.Convert();
}
This is taken from this library on code project.
If my rtf text contains Html tables such as:
{\*\htmltag96 <table cellspacing="0" border="0" width="600">}\htmlrtf {\pard\plain \f0\fs24 \htmlrtf0
They are removed in the resultant html text. How can I preserve these?
However, any text or details in the tables remains, this results in the html text not being formatted correctly because of the lack of tables.