1

I have a fillable PDF form which needs to be programatically filled for each member and added to a single pdf document.

I am able to use pdfstamper to read the existing pdf, and change the data, but I cant seem to figure out how to create multiple instances of the pdfstamper with different data in the same pdf doc.

1 Answer 1

3

You don't. One PDF stamper->1 document OUTPUT. You didn't give a lot of detail, but your workflow will probably need to be something like this:

For Each PDF form:
* Open it with a Stamper
* Fill it in
* turn on flattening
* Save it (to memory or disk)

Create a PdfCopy (or SmartCopy)

For each intermediate PDF
* Insert it into Pdf*Copy

Save your final doc.


None too efficient, but that's how it works with iText.

PS: You really do need to flatten your forms when merging multiple forms together, PARTICULARLY when you have multiple copies of the same form. In a PDF, fields that share a name also share a value.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.