gpt4 book ai didi

java - java中如何将rft字符串转换为纯文本?

转载 作者:行者123 更新时间:2023-12-01 11:00:34 25 4
gpt4 key购买 nike

我一直在寻找在java中将RTF字符串转换为纯文本的方法,但不幸的是我找不到解决方案。

我需要将此 RTF 字符串转换为纯文本

{\rtf1\ansi\ansicpg932\deff0\deflang1033\deflangfe1041{\fonttbl{\f0\fnil\fcharset128 \'82\'6c\'82\'72 \'96\'be\'92\'a9;}{\f1\fnil\fcharset128 MS UI Gothic;}} {\colortbl ;\red0\green128\blue128;} \viewkind4\uc1\pard\cf1\lang1041\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \cf1\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \cf1\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \cf1\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \cf1\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \cf1\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \cf1\b\f0\fs24\'83\'65\'83\'58\'83\'67\'82\'c5\'82\'b7\'81\'42\cf0\b0\f1\fs20\par \par }

你能帮我一下吗?

最佳答案

我在这里找到了解决方案:

http://akigamyl.web.fc2.com/Java/RTFio/RTFio_java.html

  • 第 1 步:读取数据并保存到临时文件
  • 第 2 步:将临时文件读取为字符串

关于java - java中如何将rft字符串转换为纯文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33362132/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com