java 中可用的替代库来生成 PDF 文档

发布于 2024-08-26 15:34:03 字数 191 浏览 6 评论 0原文

我一直在使用 XSL-FO 和 FOP Engine 来生成所需数据的 PDF 文档。这很有效,但最近我发现 FOP 存在一些限制,特别是在允许用户在 html 编辑器中输入文本(可以将其转换为 XSL-FO 并提供给 FOP 驱动程序)时。

这让我想询问这个由消息灵通的个人组成的大型社区,有哪些开源甚至非开源库可以用 Java 生成 PDF 文档?

I have been using XSL-FO and FOP Engine to generate PDF documents for required data. This works great, but lately I have seen some limitations in FOP especially when it comes to allowing user to enter text in a html editor which can be transformed to XSL-FO and given to FOP driver.

This brought me to point to ask this large community of well informed individuals about what are possible Open Source or even non open source libraries to generate PDF documents in Java?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

西瑶 2024-09-02 15:34:03

如果您想坚持使用 XSL-FO 并准备走商业路线,我建议使用 RenderX 的 XEP。我最近从 FOP 0.2x 转向它,发现它通过使用扩展绕过了许多 FOP 限制。

缺点是它的成本有点高,但我建议您看一下:http:// new.renderx.com/tools/xep.html

If you want to stick with XSL-FO and are prepared to go the commercial route, I would suggest using RenderX's XEP. I have recently moved to it from FOP 0.2x and found it gets round a lot of FOPs limitations through the use of extensions.

The down side is it costs a bit, but I would suggest you take a look: http://new.renderx.com/tools/xep.html

负佳期 2024-09-02 15:34:03

BigFaceless 有一个闭源选项,用于用 Java 构建文档并将其转换为 PDF:

http://big .faceless.org/products/pdf

BigFaceless has a closed source option for building up a document in Java and transforming it to PDF:

http://big.faceless.org/products/pdf

一笔一画续写前缘 2024-09-02 15:34:03

PDFBox 是 Apache 的另一个开源选项。

PDFBox is another open source option from Apache.

痕至 2024-09-02 15:34:03

您可以使用 Docmosis,它是免费的,基于 OpenOffice 和 Java,几乎可以在任何平台上运行。它可以生成大型文档(感谢 OpenOffice),并且 Docmosis 包含一些克服 OpenOffice 对非常大的文本块等的限制的能力。我不能说这是否会解决用户输入内容的问题,但这不应该成为任何系统中的一个因素,只要您在需要时在用户数据中正确编码/转义 XML 令牌即可。

You could use Docmosis which is free, sits over OpenOffice and Java and can run on just about any platform. It can generate large documents (thanks to OpenOffice) and Docmosis contains some ability to overcome limitations in OpenOffice for very large text blocks and the like. I can't say whether this will solve your issues with user entered content but that shouldn't be a factor in any system as long as you are correctly encoding/escaping XML tokens inside user data when you need to.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文