Article
Why you can't copy text from a PDF
Try to select a line in one PDF and the words highlight normally, ready to copy. Try the same gesture in another PDF and nothing happens, or the cursor grabs the whole page like a photograph, because that is exactly what it is. Two files that look identical on screen can be built completely differently underneath. Here is how to tell which kind you have, and how to extract the text you need.
Two different kinds of PDF page
A PDF can store a page in two very different ways. In a text-based PDF, every letter is a character object with a Unicode value, a font and a position, the same way a webpage stores text: a viewer can select it, search it, and a screen reader can read it aloud. In an image-based PDF, the page is one flat picture, often produced by a scanner, a fax, or a "print to PDF" step applied to a photo of a document. The letters look the same to your eyes, but to the file format there is no character underneath, only pixels.
| Feature | Scanned Image PDF | Corrupted /ToUnicode CMap | Protected /Encrypt Permission |
|---|---|---|---|
| Visual / UI Symptom | Cursor cannot highlight characters | Pasted text shows gibberish / mojibake | Copy command greyed out / disabled |
| Technical Root Cause | No glyph stream; only /XObject Do image | Glyph IDs map to incorrect Unicode points | Owner password restrictions (P flag bit 5) |
| Diagnostic Check | pdf.js textContent is empty array | Font descriptor /Widths without CMap | PDF Document Security Info dialog |
| Browser Local Remedy | Client-side Tesseract.js OCR | Rasterize page -> OCR text recovery | In-browser permission decrypt / unlock |

A quick way to tell which one you have
Press Ctrl+F or Cmd+F and search for a word you can clearly see on the page. If the search finds it and highlights it, the page has a real text layer. If the search finds nothing anywhere in the document, the page is an image, no matter how sharp or how much like a typed document it looks. Dragging the mouse to select a line gives the same answer: a highlight versus a plain rectangle selection.
| Feature | Local In-Browser Solution | Cloud Unlock Portals |
|---|---|---|
| Data Location | In-Memory TypedArray (Uint8Array) | Uploaded to Remote Web Server |
| Text Extraction Engine | PDF.js + Tesseract.js Web Worker OCR | Proprietary Server PDF Parser |
| Retention Time | 0 ms (Garbage collected on tab close) | Stored on Server Disk |
| File retention & verification | Zero upload, verifiable in your browser Network tab (F12) | Outbound HTTP POST multi-MB |
| Works offline | After the required downloads, while the browser retains them | No |
Reconstructing the text with OCR
Optical Character Recognition (OCR) reads the pixels of an image-based page and matches the shapes against a trained model of letters for a given language, then rebuilds readable text from the recognized characters. Our browser-based OCR tool (28 languages, up to 50 MB) extracts recognized text directly to plain text, while our PDF OCR tool (12 Latin languages, up to 80 MB) writes an invisible searchable text layer back into a new PDF. Both run entirely in your browser with zero uploads. Accuracy depends on the source: a clean, straight, high-resolution scan in a well-supported language recognizes reliably, while a skewed, blurry, low-contrast or handwritten page produces more mistakes, sometimes a wrong character or a misread word.

When the file already has text but extraction looks wrong
If your PDF does have a real text layer but our PDF to Text tool produces text in a strange order, with columns merged or spacing collapsed, that is a different, unrelated issue: the text objects exist but their reading order on the page was not stored the way a script naturally expects. That is a layout quirk to clean up after extraction, not a sign that the text is missing, and it does not need OCR to fix.
Tools in this article
- OCR · Image & PDF to TextExtract editable text from images (PNG, JPG, WebP, TIFF) and scanned PDFs in 28 languages right in your browser.
- PDF to textExtract the text already present in a PDF and download a TXT file. Use OCR for an image-only scanned document.
- PDF OCR · make it searchableAdd a searchable text layer to scanned PDFs locally in 12 Western Latin languages with custom page ranges and dual-language support.
Frequently asked questions
My PDF looks like a normal typed document but I still can't select any text. Why?
It is most likely a scanned or photographed page saved as a PDF, or a document flattened to an image on purpose. Visually it can be indistinguishable from a text-based PDF; the difference only shows up when you try to search or select it. Running it through OCR rebuilds a real, selectable text layer from the pixels.
Does OCR work equally well in every language?
No. Accuracy depends on whether a trained model exists for that language and script, and on the quality of the scan. Well-supported languages on a clean, straight scan recognize reliably; handwriting, low-resolution images, or languages with less training data produce more errors. OCR output is always a best-effort transcription, worth a quick proofread before you rely on it.