如何转换HTML ==>Java中的RTF? [英] How to convert HTML ==> RTF in Java?

查看:65
本文介绍了如何转换HTML ==>Java中的RTF?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用RTFEditorKit和HTMLEditorKit的JAVA的基本API无法识别< br/> < table> 之类的标签.因此,我在互联网上搜索了将HTML转换为RTF的更好方法,并且发现了两个似乎可行的解决方案.JODConverter和HTML-to-RTFconverter.第一个需要安装OppenOffice才能工作,第二个使用DLL,因此不能在Linux上使用.

The basic API of JAVA that uses RTFEditorKit and HTMLEditorKit, is not able of recognize tags like <br/> and <table>. So I have searched on internet a better way of converting HTML to RTF and i have found two solutions that seem to work. JODConverter and HTML-to-RTFconverter. The first one needs OppenOffice installed to work and the second one uses DLL, so it can’t be used on Linux.

有人知道其他解决方案吗?

Does anyone know about other solution?

感谢您的帮助!!!!

Thanks for any help!!!!

推荐答案

如果它是有效的html,则可以使用Apache-FOP.

If it is valid html, you can use Apache-FOP.

有些样式表可将html转换为FO.

There are stylesheets for transforming html to FO.

Apache FOP也可以编写PDF和RTF.

Apache FOP can write PDF and RTF as well.

http://www.torsten-horn.de/techdocs/java-xsl.htm#XSL-FO-Java

http://html2fo.sourceforge.net/index.html

这篇关于如何转换HTML ==&gt;Java中的RTF?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆