Java HTML-> PDF解决方案? [英] Java HTML->PDF Solutions?
问题描述
我目前正致力于使用Java构建基于PDF的报告。我已经看过iText和BIRT,但似乎需要付出很多努力来学习他们正在寻找的API,这个解决方案可以让我在HTMl中生成报告(我已经知道了)并将其输出到PDF。谁能提供一些可能的解决方案? - 谢谢! - Duncan krebs
I'm currently working on building a PDF based report in Java. I have looked at iText and BIRT but it seems like a lot of effort to learn their API's what I'm trying to find is a solution that will let me generate the report in HTMl (something I already know) and output that to PDF. Can anyone provide some possible solutions? - Thanks! - Duncan krebs
推荐答案
Flying Saucer将XHTML转换为PDF。太棒了。它并不快。如果您的XHTML语法中存在轻微错误,则会失败。 (例如< br>
何时应该< br />
)
Flying Saucer converts XHTML to PDF. It is great. It is not fast. It fails if there is a slight error in your XHTML syntax. (such as <br>
when it should be <br/>
)
这是让我入门的链接。它似乎使用iText,但是一旦你有了工作,只需更改HTML并进行更新。
This is the link that got me started. It seems to use iText, but once you have the thing working, just change the HTML and it updates.
http://today.java.net/pub/a/今天/ 2007/06/26 / generating-pdfs-with-flying-saucer-and-itext.html
可能有更好的方法,这个我是怎么做到的。
There may be a better way, this is how I did it.
这篇关于Java HTML-> PDF解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!