Test cases / pdf

deft pdf flatten

Bake forms into pages

1 run on real files, 2 tests on generated files, not shown. 0 failed.

Fixed cases

Generated files, compared with ground truth by tools other than deft.

a filled real tax formPassed

It must print 0 fields.

deft pdf fill fw9.pdf --data w9-values.json -o filled.pdf
deft pdf flatten filled.pdf -o out.pdf
deft pdf fields out.pdf

Input

fw9.pdf 137.5 KB · 6 pages
Page 1Page 2Page 3
{"topmostSubform[0].Page1[0].f1_01[0]": "Ada Lovelace"}

Output

filled.pdf 135.2 KB · 6 pages
Page 1Page 2Page 3
out.pdf 79.2 KB · 6 pages
Page 1Page 2Page 3
What it printed
ok pdf.fill fw9.pdf -> filled.pdf  1 fields  0.01s
ok pdf.flatten filled.pdf -> out.pdf  23 annotations  0.01s
ok pdf.fields out.pdf  0 fields
fields=[]
Automatic checks (1)
  • pdf_text: contains = ["Ada Lovelace"], file = "out.pdf"