将 RTF 流转换为纯文本流

发布于 2024-07-10 22:12:50 字数 93 浏览 8 评论 0原文

我有水晶报告,我需要将其转换为文本文件。 目前我只能将其转换为RTF流。 现在我需要将 RTF 流转换为文本流。 我正在使用 C#。

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九命猫 2024-07-17 22:12:50

如果我错了,请纠正我,但您正在使用 ExportToStream 方法ExportFormatType.RichText

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

这会将报表导出到 RTF 流中。 现在您希望将此流转换为纯文本(从 RTF 中提取文本)。 如果这是真的,那么此线程可能会给你答案。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文