Convert RTF Stream to Plain Text Stream

2019-07-24 12:01发布

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.

1条回答
兄弟一词,经得起流年.
2楼-- · 2019-07-24 12:41

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.

查看更多
登录 后发表回答