I am trying to export a FlowDocument
which contains a grid to rtf. I used the following code
using (FileStream fs = new FileStream(@"C:\demo.rtf", FileMode.OpenOrCreate, FileAccess.Write))
{
TextRange textRange = new TextRange(doc.ContentStart, doc.ContentEnd);
textRange.Save(fs, DataFormats.Rtf);
}
However I am getting a blank document. How can this be solved?