【问题标题】:Read RTF file content in asp.net with Aspose.Words使用 Aspose.Words 读取 asp.net 中的 RTF 文件内容
【发布时间】:2019-03-26 15:51:01
【问题描述】:

我需要读取一个包含一些文本的 .RTF 文件,然后将其保存在一个字符串变量中,我在网上搜索了很多并且没有免费的方法可以做到这一点。 我有 Aspose.Words 的商业许可,它可能与该库有关(或以各种方式)?

最好的问候。

【问题讨论】:

    标签: asp.net rtf aspose.words


    【解决方案1】:

    您可以使用以下简单的 Aspose.Words 代码获取 RTF 文档的文本表示:

    Document doc = new Document("E:\\temp\\in.rtf");
    string rtfText = doc.ToString(SaveFormat.Text);
    

    希望,这会有所帮助。我与 Aspose 合作,担任开发人员宣传员。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-01
      • 1970-01-01
      • 2010-11-04
      • 1970-01-01
      相关资源
      最近更新 更多