Blog
OCR & Scanning

Blog

How to Extract MCQs from a Scanned PDF Automatically

Scanned exam papers don't have selectable text, so extracting MCQs means OCR plus real structure recognition. Here's how that actually works.

FFormatly Team4 min read

Scanned pages are images, not text

A scanned PDF — a phone photo of a printed paper, or a flatbed scan of an old exam booklet — has no underlying text layer at all. Every character on the page is just pixels. Before anything can be "extracted", the page has to be read as an image and converted into recognized text first, which is a fundamentally different (and harder) problem than parsing a digitally-typeset PDF that already has selectable text.

Structure matters more than raw text

Getting readable text off the page is only step one. The bigger challenge for MCQs specifically is figuring out which lines are the question stem, which are the four (or five) options, and where the answer key or explanation sits — especially when a source paper crams a question, its options and its answer onto a few dense lines with minimal spacing, or splits it across a two-column layout where reading order isn't simply top-to-bottom across the full page width.

Test Formater handles this by reading the OCR'd text and using an AI pass to actually parse the structure — recognizing option markers like (A)/(B)/(C)/(D) or 1)/2)/3)/4), distinguishing a genuine new question from a numbered sub-list inside one question, and matching an answer key document back to the right question by number when the two are kept separate.

What comes out the other end

The result is a structured question bank — not a wall of OCR'd text you still have to manually sort into questions and options, but a bordered-table file already laid out in a bulk-import-ready format for whichever platform you're targeting. Diagrams and figures that were part of a question get carried through as embedded images in the same field they appeared in, rather than getting dropped.