如何使用java将预格式化文本转换为RTF
你好,我有一个纯文本 emial(用简单的换行符预先格式化),我想将其转换为 RTF 以将其存储在数据库中
我有一个用 .NET/C# 编写的桌面应用程序,并且必须创建一个 Web 界面(用 JAVA 编写) )所以这就是为什么我需要 rtf2text 和 text2rtf 转换
我可以使用 swing 包中的 rtfeditorkit 进行 rtf2text 转换....
我可以使用 rtfeditorkit 做相反的事情还是我必须找到另一个解决方案?
我已经尝试过 srv (简单的 rtf writer)来进行从文本到 rtf 的转换,但它不起作用,因为转换后所有格式都消失了:(
那么如何进行 text2rtf 转换以保留原始格式 话,
如果可能的
请给我一个代码示例提前致谢
hello I have a plain text emial (preformated with simple line-breaks) which I would like to convert to RTF to store it in database
I have a desktop application written in .NET/C# and have to create a web interface (written with JAVA ) for that So that's why I need rtf2text and, text2rtf conversion
I could do the rtf2text conversion with rtfeditorkit from the swing package....
can I do the opposite with rtfeditorkit or I have to find another solution?
I have already tried srv ( simple rtf writer ) to do the conversion from text to rtf, but it didn't work because all the formatting was gone after the conversion :(
So how to do the text2rtf conversion to preserve the original formating of the text?
Please give me a code sample if it is possible
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
iText 支持 RTF 生成
http://www.lowagie.com/iText/
顺便说一句,您声明您的电子邮件是纯文本然后保留格式。这些不是很矛盾吗?
iText support RTF generation
http://www.lowagie.com/iText/
BTW, you state that your email are plain text and then to retain formatting. Aren't those contradictory?