{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}}
\viewkind4\uc1\pard\b\fs20 Dysphagia:\b0
\par You are suffering from dysphagia -- a difficulty in swallowing food. This is due to a narrowing in the esophagus. Most commonly, it's due to chronic effects of esophagitis (an inflammation of the lower esophagus due to stomach acid, causing symptoms such as chest pain or heartburn). A hiatal hernia is often present.
\par Meat and poorly chewed food may stick in the lower esophagus, blocking it. If this is a recurrent problem, a procedure to dilate the esophagus may be necessary. If the dysphagia has just begun, further testing to evaluate the cause of the obstruction will be necessary.
\par Most commonly, the problem will resolve once swelling in the esophagus stops. Usual treatment is antacids or acid-suppressing medication. Membrane-coating medicine (such as Carafate), or medicine to keep acid out of the esophagus (such as Reglan) may be helpful for some patients.
\par Call the doctor or return for re-evaluation if you develop chest pain, fever, shortness of breath, or inability to swallow fluids.
\par }
i need to convert this as normal text
David HelfgottPosted Jun 15, 2014, 2:13 PM
Posted Nov 14, 2013, 2:47 PM
Pfa code for rtf to plain text and if its correct as what you need so please do like it.
class ConvertToPlainFromRTF
{
static void Main()
{
// If your RTF file isn't in the same folder as the .exe file for the project,
// specify the path to the file in the following assignment statement.
string path = @"test1.rtf";
//Create the RichTextBox. (Requires a reference to System.Windows.Forms.)
System.Windows.Forms.RichTextBox rtBox = new System.Windows.Forms.RichTextBox();
// Get the contents of the RTF file. When the contents of the file are
// stored in the string (rtfText), the contents are encoded as UTF-16.
string rtfText = System.IO.File.ReadAllText(path);
// Display the RTF text. This should look like the contents of your file.
System.Windows.Forms.MessageBox.Show(rtfText);
// Use the RichTextBox to convert the RTF code to plain text.
rtBox.Rtf = rtfText;
string plainText = rtBox.Text;
// Display the plain text in a MessageBox because the console can't
// display the Greek letters. You should see the following result:
// The Greek word for "psyche" is spelled ????. The Greek letters are
// encoded in Unicode.
// These characters are from the extended ASCII character set (Windows
// code page 1252): âä?å
System.Windows.Forms.MessageBox.Show(plainText);
// Output the plain text to a file, encoded as UTF-8.
System.IO.File.WriteAllText(@"outputplain.txt", plainText);
}
}