How to extract the text from a PDF
- Choose a reading order
Natural order for a normal document. Block layout when the page has columns, because natural order interleaves them into nonsense.
- Extract
You get a .txt file, plus a count of words found and pages with no text.
- Read the empty-page count
If it equals the page count, the document is a scan and there is nothing to extract. That is a fact about the file, not a failure of the tool.
Why this matters for exam and study documents
Extracting a mark scheme to plain text makes it searchable in any editor, and turns a 40-page PDF into something you can grep for the one phrase you are trying to find.
What is kept, what changes, and what this will not do
Taking content out of a PDF always costs something. Rendering keeps the appearance and discards the text; extraction keeps the meaning and discards the layout. There is no option that keeps both.
Kept
- Every character present in the text layer
- Reading order, as well as the file's own structure allows
Changed
- All formatting - bold, size, colour, position - is discarded
- Tables become runs of text without their grid
- Images, equations drawn as graphics and handwriting are not text and do not appear
Limits
- This does not perform optical character recognition. A scanned page produces nothing, and the result panel says so rather than returning an empty file quietly.
Questions and answers
Why did I get an empty file?
Because the PDF has no text layer. It is an image of a page. Every page of it would have to be read by optical character recognition to become text, and this tool does not do that or pretend to.
How can I tell whether a PDF is scanned?
Open it in the reader and try to select a word. If the cursor sweeps across as though over a photograph, it is a scan. This tool reports the same thing numerically.
Why is my table mangled?
A PDF does not store tables, only characters at positions. Block layout order preserves more of the structure than reading order, but no text extraction fully reconstructs a grid.
Are equations extracted?
Only if they were set as text. Equations drawn as vector graphics, and everything in a scanned page, are invisible to text extraction.