No upload, 100% local, no account

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.

FeatureScanned Image PDFCorrupted /ToUnicode CMapProtected /Encrypt Permission
Visual / UI SymptomCursor cannot highlight charactersPasted text shows gibberish / mojibakeCopy command greyed out / disabled
Technical Root CauseNo glyph stream; only /XObject Do imageGlyph IDs map to incorrect Unicode pointsOwner password restrictions (P flag bit 5)
Diagnostic Checkpdf.js textContent is empty arrayFont descriptor /Widths without CMapPDF Document Security Info dialog
Browser Local RemedyClient-side Tesseract.js OCRRasterize page -> OCR text recoveryIn-browser permission decrypt / unlock
Side-by-side comparison: a text-based PDF page with a highlighted, selectable line of text next to an image-based PDF page where the same-looking text is one flat picture with no selection.
Text-based PDF objects versus a flat image-only PDF scan

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.

FeatureLocal In-Browser SolutionCloud Unlock Portals
Data LocationIn-Memory TypedArray (Uint8Array)Uploaded to Remote Web Server
Text Extraction EnginePDF.js + Tesseract.js Web Worker OCRProprietary Server PDF Parser
Retention Time0 ms (Garbage collected on tab close)Stored on Server Disk
File retention & verificationZero upload, verifiable in your browser Network tab (F12)Outbound HTTP POST multi-MB
Works offlineAfter the required downloads, while the browser retains themNo

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.

Pipeline diagram: pixels of a scanned page go through OCR character recognition and come out as a reconstructed, positioned text layer.
Recovering searchable text from a scanned page with local OCR

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

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.

Sources