Build breakdown

From a flat Word form to a fillable PDF, checked field by field

Summary: A repeatable way to turn a three page Word form into a two page fillable PDF, then prove with an automated check that every field is in the right place, the right type, and marked required where it should be.

A build I made for a posted project brief. I built this as a dry run on a made-up form. It is not a delivered engagement, and nothing here is a result from live use.

The problem, as a generic brief

Someone has an application form in Word. It runs to three pages. They want a clean two page PDF that people can fill in on screen, with text boxes, checkboxes, dropdowns, a date and a signature, and with the original look kept.

The risks are fields that sit slightly off the printed lines, required flags that do not carry through, and a form that behaves differently in different PDF readers.

What I built

  • A fictional three page form in Word, used as the stand in for the real document.
  • A two page condensed version of the same form, with the spacing tightened in the Word source first so the design is not stretched.
  • A fillable PDF with 34 fields: text fields, a multiline box, checkboxes, dropdowns with fixed choice lists, a date field and a true PDF signature field.
  • A small toolkit of scripts that does the work after the fields are placed:
    • reads the page geometry (printed lines, checkbox positions) and drafts a field plan,
    • post processes the exported PDF (required flags, default font size, real signature field),
    • checks every field against the plan,
    • fills the form with sample data and renders it for a visual check.
  • A before and after image, and a short page that lets someone click through the fillable sample.

How it works

  1. Condense the layout in Word first, so the typography stays consistent. Anything that has to move or be trimmed is flagged for approval before it changes.
  2. Read the geometry. A script finds the underline rows and checkbox glyph positions and drafts a field list with exact coordinates.
  3. Place the fields with a form creator tool, one field per position in the plan.
  4. Clean up the export. The tool I used did not write the required flag, gave multiline boxes a broken default font size, and exported signature fields as plain text. A post process step fixes all three.
  5. Verify. A script reads every field back and checks its page, type, position (within about a point), required flag and multiline flag against the plan.
  6. Fill test. The form is filled with sample data and rendered in more than one PDF engine to confirm nothing shifts.
  7. Choose the field style. I compared four field treatments (black box, underline, hairline box, tinted box) and chose the underline, because it keeps the form's own rules visible.

One honest finding from the dry run: the form tool's own online "fill and download" feature lost the typed values, so I fill and test with a standard PDF library and readers instead.

Stack

Python, PyMuPDF for reading, fixing and filling PDF fields, python-docx for the sample Word file, Microsoft Word for exporting to PDF, poppler for rendering previews, a browser based PDF form creator for placing fields, Cloudflare Pages for hosting a private click through page.

What I'd do next

  • Run it on a real form once one is supplied, starting with the layout condensing step and a list of anything that must move.
  • Add tab order and field naming conventions agreed with the form owner.
  • Test the finished PDF in desktop, browser and mobile readers.
  • Deliver the fillable PDF plus the updated Word source so there is one master document.
Figure placeholder

FREE CHECKLIST

Get the 10-minute lead leak check.

Seven quick tests you can run from your phone to see where calls, forms, and reviews are slipping away. Choose your business type and we will also send short tips that fit.