用于将xml / html转换为pdf的Java库 [英] A java library for converting xml/html to pdf
问题描述
我正在寻找一种开源工具,它可以让我从相当简单的XML或HTML生成PDF。可能有链接的图像以及纯文本。不会有CSS或JavaScript。理想情况下,我希望生成的PDF是可解析的,即使内容不是图像。谷歌搜索我看到有 iText 和 PDFBox的。
有什么可以推荐的吗?
您还可以考虑将飞碟(XHTMLRenderer)与着名的< a href =http://itextpdf.com/ =noreferrer> iText 。
你可以找到一个代码示例的博客这里。
I'm looking for an open source utility that will allow me to generate PDFs from fairly simple XML or HTML. There may be linked images as well as plain text. There will not be CSS or JavaScript. Ideally I'd like the generated PDF to be parsable, i.e. so that the content is not an image. Googling around I see there's iText and PDFBox.
Is there anything to recommend one over the other?
You can also consider a combination of Flying Saucer (XHTMLRenderer) and the well known iText.
You can find a blog with code samples here.
这篇关于用于将xml / html转换为pdf的Java库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!