比较这些产品的PDF生成与Java内部要求:iText,Apache PDFBox或FOP? [英] Compare these products for PDF generation with Java given requirements inside: iText, Apache PDFBox or FOP?
本文介绍了比较这些产品的PDF生成与Java内部要求:iText,Apache PDFBox或FOP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一些问题,但不是最近,技术必须从那时开始。
There were questions on that but not recently and technology must have gone ahead since then.
要求:
- 根据预定义模板生成pdf文档(我可以使用) pdf表格或xsl-fo)
- 能够填写文本数据
- 能够填充图形数据(生成条形码)
- 能够在生产环境中更改pdf模板而无需修补(重新编译)
- 生成要保存在数据库中的pdf文件(作为blob)和/或打印
- 开源/免费
- generating pdf documents based on predefined template (I can use either pdf forms or xsl-fo)
- being able to fill textual data
- being able to fill graphical data (generated bar codes)
- being able to alter pdf template in production environment without patching (recompiling)
- generating pdf file to be saved in the database (as blob) and/or printed
- open source/free
假设的选项是iText,PDFBox,FOP,还有其他?什么是基于上述要求的建议?
The options assumed are iText, PDFBox, FOP, anything else? What are recommendations based on the requirements above?
推荐答案
- iText;如今iText是一个商业图书馆,最新版本不再免费
- FOP;我和FOP一起工作了很多。它是相当资源密集型的(Java> XML> XSLT> PDF),复杂的PDF变成了一场噩梦(可能导致XSLT带有20k + LoC)
- PDFBox;它似乎是最好的选择,虽然我没有在大项目中使用它
- 没有检查飞碟
- iText; nowadays iText is a commercial library, the latest version is not for free anymore
- FOP; I worked a lot with FOP. It's fairly resource intensive (Java > XML > XSLT > PDF) and complex PDFs become a nightmare ( may result in XSLTs with 20k+ LoC)
- PDFBox; it seems to be the best alternative although I did not work with it in large projects
- Did not check Flying Saucer yet
总而言之,我会试试PDFBox。根据您的条形码要求,您可能需要将条形码(字体)内嵌到PDF中或将字体分发给您的客户 - 处理这些问题。
To conclude, I'd give PDFBox a try. Depending on your bar code requirements you may need to inline your barcode (font) into the PDF or distribute the font to your clients - take care of those issues.
这篇关于比较这些产品的PDF生成与Java内部要求:iText,Apache PDFBox或FOP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文