We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
我有点偏见(提交者),但我建议使用 iText。
PDF 表单:检查
PDF 表格,检查。您还可以执行编程布局。
检查。给定一个已知位置(可能是“该特定注释的位置”),iText 将为您绘制一个给定符号系统和值的条形码。您可以从此处列出的常量推断出支持的符号系统列表。
对于此类事情,我使用具有“仅图标”外观的按钮字段。 “图标”是一些任意的 PDF 绘图指令或图像。 iText 的条形码内容将创建一个
PdfTemplate
,您可以将其填充到按钮中而不用太麻烦。如果您的所有布局都已烘焙到 PDF 模板中,并且您的“条形码位于此处”信息未硬编码到源中,那么您就很出色。
PDF 是 PDF 是 PDF。哎呀,只要您做一些额外的工作,您就可以使用 iText 来构建 PDF/A 文件。 “A”代表存档。
开源:是的。 v2.1.7 是使用 MPL 的最后一个版本。从 5.x 开始,所有 iText 版本都在 AGPL 下。是的,iText 从 2.1.7 跳到了 5.0,以便同步 iText 和 iTextSharp 之间的版本编号。
“little f”并不完全免费,但 2.1.7 版本并不难获得。 OTOH,它是孤儿软件,没有维护。做一个知情的消费者。
I'm a bit biased (committer), but I suggest iText.
PDF forms: Check
PDF Forms, check. You can also perform programmatic layout.
Check. Given a known location (which could be "the location of this particular annotation"), iText will draw a barcode for you given a symbology and value. You can deduce a list of supported symbologies from the constants listed here.
For this sort of thing, I use Button fields with an "Icon Only" appearance. The "icon" is some arbitrary PDF drawing instructions, or an image. iText's barcode stuff will create a
PdfTemplate
you can stuff into the button without too much trouble.If all your layout is baked into the PDF template, and your "barcode goes here" info isn't hard coded into the source, then you're golden.
A PDF is a PDF is a PDF. Heck, with some extra work on your part, you can use iText to build PDF/A files. "A" is for Archive.
Open Source: Yes. v2.1.7 was the last version to use the MPL. Since 5.x, all iText releases have been under the AGPL. Yes, iText skipped from 2.1.7 to 5.0, in order to synchronize the version numbering between iText and iTextSharp.
Not exactly "little f" free, but the 2.1.7 version isn't that hard to come by. OTOH, it's orphan-ware, unmaintained. Be an informed consumer.
这也取决于您想要如何创建 PDF。 FOP 基于 XML 工作,IText 允许您通过 Java 以编程方式创建。
It depends how exactly you want to create the PDF as well. FOP works from XML, IText lets you create programmatically from Java.
另一个对飞碟的竖起大拇指。如果您熟悉 html 和 css,它效果很好并且很容易使用。
没有真正记录的是如何访问 iTexts 内置条形码功能。然而,这可以很容易地实现。我在这里发布了一个简短的教程: http ://andreas.haufler.info/2012/12/generate-barcodes-in-pdfs-with-flying.html
Another thumbs up for flying-saucer. It works quite well and is easy to use if you're familiar with html and css.
What isn't really documented is how to access iTexts built-in barcode functionality. However this can be easily accomplished. I've put up a short tutorial here: http://andreas.haufler.info/2012/12/generating-barcodes-in-pdfs-with-flying.html
没有人在谈论BFO(Big Faceless),尽管它是商业的
nobody is talking about BFO(Big faceless) though it's commercial
总而言之,我会尝试一下 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.
我用 Flying Saucer 完成了一个项目 http://code.google.com/p/flying -saucer/ 基于 iText。它是免费的,易于使用,对 CSS 有很好的支持,并且有很好的开源功能。
I've done a project with Flying Saucer http://code.google.com/p/flying-saucer/ which is based on iText. It's free, easy to use, has great support for CSS, and has nice open source.
我认为 iText 和 Apahce FOp 都可以满足您的标准,但这里您还有一些额外的标准:
我不会使用 PDFBox,它对于读取和修改现有 PDF 文件很有用,但使用 PDFBox 从头开始创建文件可能需要大量工作。
I think your criteria can be met with both iText and Apahce FOp but here you have some additional criteria:
I would not use PDFBox, it is good for reading and modifying an existing PDF file but createing a file from scratch using PDFBox can be a lot of work.