简体   繁体   English

我怎样才能创建一个 PDF 表单,而不是用 Java 中的用户生成数据填充它,使用 iText?

[英]How can i create a PDF form, than fill it with user generated data in Java, with iText?

Let's say if i have this PDF form.假设我有这个 PDF 表格。 How can i fill it with user generated data, in Java?如何在 Java 中用用户生成的数据填充它?

在此处输入图像描述

For instance:例如:

 PdfAcroForm form = PdfAcroForm.getAcroForm(pdfDoc, true);
 form.getField("test").setValue(value);

You can find a lot of examples there: https://itextpdf.com/en/resources/examples/itext-7/filling-out-forms你可以在那里找到很多例子: https://itextpdf.com/en/resources/examples/itext-7/filling-out-forms

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM