Search code examples
textcrystal-reportsstreamrtf

Convert RTF Stream to Plain Text Stream


I have crystal report and I need to convert it to text file. Currently I can only convert it to RTF Stream. Now I need to convert the RTF Stream to Text Stream. I am using C#.

Thanks.


Solution

  • Correct me if I am wrong but you are using the ExportToStream method with ExportFormatType.RichText:

    Stream stream = report.ExportToStream(ExportFormatType.RichText);
    

    This exports the report into an RTF stream. Now you wish to convert this stream to plain text (extract the text from the RTF). If that's true then this thread might have the answer for you.