Sample PDF with Form Fields (Fillable AcroForm)
Two single-page AcroForm PDFs covering the five field types that appear in virtually every real-world form. sample-form.pdf has every field empty; sample-form-filled.pdf is the identical form with every field populated — so you can test filling in one direction and reading/flattening in the other.
The fields, exactly
Field names are stable and namespaced — safe to hardcode in tests:
applicant.name— single-line text field (filled value:Alex Sample)applicant.notes— multiline text field (filled value spans two lines, to prove line breaks survive)applicant.subscribe— checkbox (filled: checked)applicant.contact— radio group with optionsemail/phone(filled:email)applicant.country— dropdown with five options (filled:Ukraine)
What to test with the empty form
- Interactive filling — open it in the form filler, type into each field type, download, reopen: did every value persist?
- Programmatic filling — most PDF libraries address fields by name; the dotted names above will tell you quickly whether a library treats
applicant.nameas one field or as anamechild of anapplicantnode (both interpretations exist in the wild). - Field enumeration — a correct reader lists exactly 5 fields. Some libraries report each radio option as its own field; now you'll know yours does.
What to test with the filled form
- Value extraction — read all five values back; the multiline field is the one that usually breaks (line break becomes
\r,\n, or vanishes). - Flattening — run it through flatten: the values should become permanent page content and the fields should stop being editable. Then extract text and confirm "Alex Sample" survived the trip.
- The email-a-filled-form bug — some viewers show filled values only in an appearance stream the next viewer ignores, which is why forms "arrive empty" by email. Both files here have regenerated appearance streams, so if a viewer shows this one empty, the viewer is at fault.
FAQ
Is this XFA or AcroForm?
AcroForm — the standard, widely supported kind. XFA is a deprecated Adobe-specific format that most browsers and libraries never supported; if you need an XFA sample, you actually need a migration plan.
Why do filled PDF forms sometimes show empty in other viewers?
The value lives in the field dictionary, the pixels live in an "appearance stream" — and some tools update one without the other. These samples have both set consistently. To make values permanent for recipients, flatten the form before sending.
Are there validation rules or JavaScript in the form?
No — no field validation, no calculation scripts, no JavaScript of any kind. It's the plain-vanilla baseline. If your code handles this file wrong, it'll handle nothing right.
Can I add my own fields to it?
Yes — CC0, so modify freely. The generator source shows how each field is created with pdf-lib if you'd rather build a variant from scratch.