Extracting Text and Images from PDFs: Selectable Text versus OCR
Extracting Text and Images from PDFs: Selectable Text versus OCR
If you can select text, extract it. If the page is only an image, you need OCR. How to tell which case you have and what quality to expect.
Original workflow visual
Extracting Text and Images from PDFs: Selectable Text versus OCR
Understand
Review before moving forward
Check
Review before moving forward
Apply
Review before moving forward
If you can highlight words in a reader, the PDF has a text layer or text drawing operators. Extraction can copy those characters exactly, including spacing quirks. Start here before OCR. OCR on a text PDF is slower and can invent errors that were not in the original.
Scans, photographed documents and some fax exports store only pixels. No extractor can recover perfect words without OCR. OCR quality depends on resolution, contrast, language models and skew. A crooked phone photo of a receipt will always be harder than a 300 DPI flatbed scan.
Some PDFs show an image of the page and also contain an invisible text layer from a previous OCR pass. Copying text may then yield different words than you see. If accuracy matters, compare a few extracted sentences to the visible page before trusting the whole file.
Even born-digital PDFs can extract poorly when fonts use custom encodings or when text is drawn as curves. You may see correct glyphs on screen and mojibake after copy. In those cases rasterising the page and running OCR can ironically be more reliable than extraction.
Pulling embedded images is not the same as rendering a page to PNG. Embedded extraction recovers original assets when present; page rendering flattens everything visible, including text, into one image. Choose based on whether you need the original photo or a snapshot of the page layout.
OCR engines need the right language data. A Chinese scan processed as English will produce garbage. Mixed documents may need multi-language mode. Always set language explicitly when the tool allows it; auto-detect fails on short pages and low contrast.
Spot-check numbers, names and table columns. OCR often confuses 0 and O, 1 and l, and multi-column layouts. For anything financial or legal, treat OCR output as a draft that a human must confirm, not as a finished record.
Extracted text without a pointer back to page and file becomes hard to trust in reviews. When possible, store page numbers with each block, and keep the source PDF hash or filename in the same record. If OCR was used, note the engine and language settings. That metadata is what lets a later reader decide how much verification the text still needs.
OCR and extraction both struggle when text sits in multi-column tables or is interrupted by ruled lines. If the goal is a spreadsheet, expect to repair column boundaries after the first pass. For critical tables, a human-in-the-loop review of numeric columns is cheaper than discovering a shifted decimal in production. Prefer tools that can emit CSV with explicit page and bounding-box metadata when the layout is complex.
OCR set to the wrong language can still emit readable-looking words that are completely wrong. Always set language explicitly for production batches. For mixed-language pages, prefer multi-language mode or split the document by page language when the tool allows it. Spot-check proper nouns; they fail first when the language model is wrong.
When processing hundreds of pages, one catastrophic page should not discard the batch. Write per-page outputs and a manifest of successes and failures. Retry only the failed pages with different DPI or language settings. Operators then spend time on the hard pages instead of re-running the easy ones overnight.
Common Questions
Try selecting text. If nothing highlights, the page is probably image-only and needs OCR.
A hidden OCR layer may disagree with the visible image. Compare before trusting the extract.
Up to a point. Around 300 DPI is a common sweet spot. Blurry higher-DPI photos still OCR poorly.
Only if they are embedded as images. Flattened page renders are snapshots, not original assets.
Related Tools
PDF Splitter
Split selected pages from a PDF directly in the browser and export a smaller document instantly.
PDF Compressor
Rebuild each PDF page as a lighter image document, then export a smaller PDF directly in your browser.
Image to PDF Converter
Turn JPG, PNG, WebP and other browser-readable images into a multi-page PDF locally, reorder pages, and export one clean document.
PDF Protect
Add a password to a PDF directly in the browser and export a protected copy instantly.