用于将xml / html转换为pdf的Java库 [英] A java library for converting xml/html to pdf

查看:810
本文介绍了用于将xml / html转换为pdf的Java库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种开源工具,它可以让我从相当简单的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屋!

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