I was able to read a RTF file (Data table) and get this to read to a string as below.
Stream rtftxt = Request.Files[0].InputStream;
int size = Convert.ToInt32(rtftxt.Length);
Byte[] rtf = new Byte[size];
rtftxt.Read(rtf, 0, size);
string FileText=System.Text.Encoding.GetEncoding("utf-8").GetString(rtf);
I Need to either remove Rich text formatting or if possible, save this as a TXT in stream and read this stream again. Any help and suggestions will be appreciated. Thanks in advance
The WinForms
RichTextBoxcontrol can be used to convert rich text into plain text programmatically without actually placing the control on a form.The following code reads rich text from an input stream and writes the resulting plain text to an output stream.