How to Automatically Detect Form Fields in PDFs — Online PDF Edits

How to Automatically Detect Form Fields in PDFs

How automatic form-field detection finds lines and boxes on a page, which tools do it, why you must review the result, and what to do with scanned forms.

Automatic form-field detection looks at a page, finds the places that look like they want input — lines to write on, boxes to tick, labelled blanks — and creates real interactive fields there. It turns a document you have to print into one you can fill on screen, and it works well on cleanly designed forms and poorly on everything else.

What it is actually doing

The detector looks for visual cues: horizontal rules with space above them, rectangles of a certain size, labels followed by whitespace, and characteristic checkbox shapes. It is pattern recognition on the page's appearance, not comprehension. That is why it does well on a form laid out on a grid and badly on one with a dense multi-column layout or hand-drawn boxes.

It also means detection needs something to detect. A scanned form is an image; unless OCR has added a text layer and the lines are clean, there is little for the detector to work with.

Tools that do it

Adobe Acrobat — "Prepare Form" runs detection and is the most accurate generally available. It names fields from nearby labels, which saves real time on a long form.

Foxit PDF Editor — comparable detection at lower cost.

LibreOffice Draw — can add form controls, without automatic detection. Manual, free.

For creating fields directly rather than detecting them, the fillable form builder places text, checkbox and signature fields onto an existing page.

Always review what it produced

Detection is a first pass, not a finished form. Four things to check every time:

Tab order. Auto-detected fields are frequently ordered by position on the page rather than by reading order, so tabbing jumps around unpredictably. This is the most common complaint about auto-generated forms and the easiest to fix.

Field types. Detectors mistake checkbox groups for individual checkboxes, so users can tick options that should be mutually exclusive. Radio buttons have to be set deliberately.

Missed fields, particularly in tables and at page boundaries.

Field names. Auto-generated names like Text1, Text2 are unusable if the data goes anywhere afterwards. Rename them before distributing.

If the form is a scan

OCR first, and expect detection to still struggle — scanned lines are rarely straight enough for reliable recognition. Placing fields manually is often faster than correcting a bad automatic pass.

Frequently asked questions

Why did detection miss fields in my table? Table cells lack the visual cues detectors look for — there is often no underline, just a grid the detector reads as a graphic.

Can I detect fields in a scanned form? Only after OCR, and results are usually poor. Manual placement is often quicker.

Why does tabbing jump around the form? Tab order follows creation order, which follows position rather than reading order. Set it explicitly.

Do detected fields work in every reader? Standard AcroForm fields do. XFA forms are Adobe-only, which is a separate problem.

Usama Ramzan
Written byUsama RamzanFounder, Online PDF Edits

Usama Ramzan is the founder of Online PDF Edits, a browser-based PDF editor built to change text, images, and tables in existing PDFs without breaking their fonts, spacing, or multi-page layout. He writes about practical PDF editing, document workflows, and the engineering behind layout-safe editing.

Recommended reading

View all articles →