Blog · 5 min read

Flat PDF Forms and Why Detection Fails on Them

· PDFeyes Blog

Open a vendor onboarding form and you will see five boxes with labels above them. Company, contact name, email, phone, and company again for the W-9. Where to write is not in question. Anyone could fill it in with a pen in two minutes.

Hand the same file to a form filler and it may report that it found nothing.

What the software is looking at

A PDF does not describe a form. It describes marks on a page: draw a line from here to here, put this glyph at this position. Whether those marks mean "an answer goes here" is a judgment a person makes from layout, and layout is exactly what a PDF does not record.

There are three cases where the meaning survives into the file. A real form field, put there deliberately by whoever built it. A run of underscores, which is text and can be measured. A label ending in a colon with room left on the line, which is also text. Anything else is guesswork.

The five boxes on that vendor form are four lines each. No text, no field, nothing that distinguishes them from a border or a table. The labels sit above them rather than beside them, so even the colon heuristic has nothing to grab. It is a form to a person and a drawing to a parser.

The honest failure and the useful one

A tool can respond to this in two ways. It can say it found nothing and stop, which is honest and useless. Or it can say it found nothing and hand over the means to do it anyway.

Stopping is the easier engineering decision, and it fails precisely the documents where help is most needed. A form built as a fillable PDF was made by someone with the software and the inclination to do it properly. A scan of a permit application, a ruled vendor pack, a photograph of a page someone was handed at a counter: those are the ones that arrive as a wall of pixels, and those are the ones people are stuck with.

Placing a field is not the interesting part

Letting someone put a text box on a page is not difficult. The part worth building is what happens next.

Forms repeat themselves. The company name is asked for three times on that vendor pack, once explicitly labeled "again, for the W-9". A tool that lets you place three separate boxes and type into each one has automated nothing. It has given you a slower pen.

The useful version is that a value exists once and appears in as many places as the form asks for. Type the company name, put it on the header line, use it again beside the tax number, use it again on the signature block. Correct the spelling later and all three change. That is the actual work: not putting text on a page, but making the same fact appear in every place a document demands it.

The part nobody sees until it breaks

Scanned pages usually carry a rotation flag, because the page went through the feeder sideways and the flag turns it upright for whoever opens it. Software that writes into the page's own coordinate system, ignoring the flag, produces text on its side.

This is a quiet failure. It never happens on a PDF exported from a word processor, which is what most testing uses, and it happens on almost every scan, which is what most flat forms are. The two categories barely overlap, so the bug lives a long time.

Place fields on any form, including the ones with nothing to detect, and fill them in the browser. Nothing is uploaded.

Fill a PDF