Guide
Filling a PDF form in bulk: not a mail merge
Updated
Filling a PDF form in bulk is not a mail merge. Use a tool that fills the form's own fields.
Need a form filled in bulk?
2 minutes
If you ask, up to three software firms will call or email you.
Want somebody to build the pipeline?
Tell us the volume and what has to come out the other end. Up to three document and data extraction software suppliers will contact you directly.
- Free to use
- No account needed
- Steps from each maker's own guides
- Suppliers only if you ask
- Your details go to up to three document software suppliers, and no one else.
- No spam, ever. Privacy notice
This distinction sounds pedantic until somebody spends a day building a merge template to reproduce a form that already exists and must not be redesigned.
Merge to PDF Tool Index What each route can and cannot do
Question 1
What do you need out of it?
This is the decision that separates a five minute job from a scripting project, and it is worth being precise about before you start.
Email me this result
We will send you these figures and a link back to them. One email, nothing else unless you tick the box.
The difference
A mail merge generates a document. The layout is yours, the content comes from data, and the output is whatever your template says.
Filling a form takes a PDF that already exists, with named fields in it, and writes values into those fields. The layout is fixed and not yours to change, which is usually the point: official forms have to look the way they look.
Fields or no fields
If the PDF has real form fields, the work is mapping your data to the field names, and every PDF library can write them.
If it is a flat PDF with lines printed on it, there are no fields to fill. Either add form fields first, a one-off piece of work on the source document, or overlay text at fixed coordinates. That works until the issuing body reissues the form and moves everything by four millimetres.
Field names are the work
Look at them before writing anything. They are frequently strings assigned by whatever tool built the form: topmostSubform[0].Page1[0].f1_07[0] and similar.
Mapping your data to those names is most of the job. Do it once into a named configuration rather than scattering the strings through code.
Flatten or leave editable
A filled form that still has live fields can be altered by anybody who opens it. Flattening converts the values to page content and removes that.
Which you want depends on whether the document is a record or a draft. Decide explicitly rather than accepting your library's default.