Converting RTF to HTML under Windows Azure in .NET C#
Article from our customer
Hi All! Our company has a corporate server which works under Windows Azure. This document management system has many advantages, but one of the functions of document management failed to realize a long time! The aim was to convert RTF documents into HTML files. In one of the databases are stored statistical reports in RTF format which should be edited.
The SautinSoft helped us to include online converter of RTF strings from database to HTML strings. Next we’ve used a free solution to edit these HTMLs.
This is part of code in C# to convert RTF string to HTML string:
SautinSoft.RtfToHtml r = new SautinSoft.RtfToHtml();
r.OutputFormat = SautinSoft.RtfToHtml.eOutputFormat.HTML_401;
r.ImageStyle.IncludeImageInHtml = false;
r.ImageStyle.ImageFolder = Server.MapPath("");
r.ImageStyle.ImageSubFolder = "images";
r.ImageStyle.ImageFileName = "picture";
string rtf = "....."; //Get RTF from database
string html = r.ConvertString(rtf);
//show HTML
if (html.Length>0)
{
Response.Buffer = true;
Response.Clear();
Response.ContentType = "text/html";
Response.Write(html);
Response.Flush();
Response.End();
}
If you need a new code example or have a question: email us at support@sautinsoft.com or ask at Online Chat (right-bottom corner of this page) or use the Form below: