在 Java 中渲染和打印 RTF
我一直在尝试在 java 中找到一个合适的 RTF 编辑和打印解决方案,我们可以将其插入到我们的应用程序中。
查看了 RTFEditorKit
但它似乎无法渲染更复杂(且不太一致)的 RTF 文档。 也可以使用 iText 进行一些工作,但它似乎不支持打印。 (更不用说在以后的版本中已经删除了对 RTF 的支持)
确实尝试坚持使用 RTF,因为这就是我们的客户群所习惯的,但我对想法持开放态度。
还有其他人这样做吗?你怎么做?
感谢您的任何帮助和建议。
I've been trying to locate a decent RTF editing and printing solution in java that we can plug into our application.
Looked at the RTFEditorKit
however it seems to fail at rendering more complicated (and less conforming) RTF documents.
Also worked a bit with iText but it seems to not support printing. (not to mention support for RTF has been removed in later versions)
Really trying to stick with RTF as that's what our client base is used to, but i'm open to ideas.
Does anybody else do this? How do you do it?
Thanks for any help and suggestions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
建议:
看看 OpenOffice(或其后继者 LibreOffice) 适用于您特定的 .rtf 文件组合。如果 OpenOffice/LibreOffice 可以工作,那么只需使用它的(Java 就绪)API。
Suggestion:
See how good OpenOffice (or its successor, LibreOffice) works with your particular mix of .rtf files. If OpenOffice/LibreOffice works, then just use it's (Java-ready) API.
尝试使用该套件打开您的 RTF
http://java-sl.com/advanced_rtf_editor_kit.html
这个组件要打印
http://java-sl.com/JEditorPanePrinter.html
Try to use the kit to open your RTF
http://java-sl.com/advanced_rtf_editor_kit.html
And this component to print
http://java-sl.com/JEditorPanePrinter.html