How to extract text from a PDF: text layer vs scanned OCR (in the browser)
The difference between reading a PDF's text layer and running OCR on a scan, when to force OCR, and how to extract text locally and download it as a TXT file.
Contracts, papers, bank statements — you constantly need to copy text out of a PDF. An online "smart converter" gives you a Word file, but the original also leaves your computer. For sensitive material I much prefer to extract text locally.
First decide: text layer or scan?
| Type | How to tell | What to do |
|---|---|---|
| Text PDF | You can select and copy the words | Read the text layer — instant |
| Scan | It is really a picture, the text cannot be selected | Browser OCR — slower |
| Mixed | Cover image plus real text inside | Automatic: use the text layer where there is one, OCR the blank pages |
TwoThink Extract Text from PDF samples the first few pages for a text layer; when it finds very few characters it says that OCR will be used. You can also force "Text layer only" or "Force OCR" — the latter is useful when the text layer turns out to be gibberish.
The steps
- Open Extract Text from PDF
- Drop in a single PDF
- Pick a page range (everything, or something like
3-10) and the OCR language (Chinese and English by default) - Preview the result → copy it or download the TXT
The first time you process a scan the OCR language data is downloaded from this site, and the browser caches it afterwards. You can press "Stop" while it runs.
Will the reading order get mangled?
Yes, sometimes. With two columns, tables and mixed headers and footers, the text layer order may not match the reading order — the tool warns about this too, so proofread the key passages by hand.
How it divides the work with long images and page numbers
- For searchable text: use Extract Text from PDF
- For a full-page image to post: use PDF to Long Image
- To add headers and page numbers: use Header, footer and page numbers
Everything is local, with no sign-up.