PDF Viewable but Not Copyable? It May Not Be a Scan

lacks text, so it cannot be directly determined to have a “normal text layer,” nor can it be directly classified as a scanned document. Below, we separately rec

If you can read a PDF on screen but copying its text gives you garbled characters, blank space, or stray symbols, you may assume the file is a scan. Often it isn't. This guide explains what usually causes the problem, how to check the text layer with a diagnostic script, and what to verify before you translate or extract data from the file.

It is written for people who handle PDFs in translation, document processing, or data extraction workflows. You will learn how to tell a broken text mapping apart from genuine image-based content, so that OCR or other processing runs on a correct starting assumption.

Why can't you copy text from a PDF you can view? The short answer

Usually the PDF's text mapping is missing or wrong, not the file being a scan, so check the text layer before choosing a processing path.

Your situationWhat to doWhy
The PDF displays correctly but copying gives garbled or blank textCheck whether the text layer is broken before assuming a scanThe rendering engine and the copy function rely on different mechanisms
Extracted text looks plausible but may be wrongCompare the extracted string with the visual contentSome tools guess mappings, producing "pseudo-text"
The page has an image but no textCheck whether the image actually contains textAn image reference alone does not prove a full-page scan
Neither text nor images are detectedLook at the page renderingEmpty extraction does not prove the page is blank
You plan to translate the documentVerify page order, source locations and text integrity firstTranslation on a broken text layer produces unreliable output

Understand what the symptom means

Why a PDF can look right but copy badly

Users can normally see the text in a browser or reader, yet copying it produces garbled characters, blank spaces, or irrelevant symbols. This is usually neither file corruption nor a purely scanned document.

The root cause is usually a missing or faulty ToUnicode CMap, the table that maps glyphs to Unicode characters. The rendering engine uses glyph indices to draw the page, while clipboard and text-extraction tools depend on the mapping table to recover real characters. When these two mechanisms are disconnected, you get a text layer that looks intact on screen but cannot be read by a machine.

How glyph indices break Unicode mapping

The PDF specification allows fonts to embed only glyph outlines and width information, without character encoding mappings. The problem arises in two cases:

  • The software that generated the PDF did not write the ToUnicode table correctly.
  • A custom encoding was used without providing decoding rules.

In either case, the extractor obtains only the raw glyph IDs (CIDs). These IDs are meaningful to rendering engines but useless for text processing.

Why garbled output is more dangerous than blank output

Some tools try to infer mappings with heuristic algorithms. The results often look reasonable but are wrong, for example:

  • Chinese punctuation converted into Latin letters
  • Digits replaced with control characters

This pseudo-text is more dangerous than plain whitespace because it can pass null checks while silently contaminating downstream processes. The key test is therefore not whether you can select text, but whether the extracted string matches the visual content.

Check the text layer with a self-contained example

The example below uses synthetic samples. Its dependencies are listed in the import list, and it constructs its inputs in memory.

from io import BytesIO
from PIL import Image
import pymupdf
def inspect(page):
    text = page.get_text().strip()
    images = page.get_images()
    if "\ufffd" in text:
        state = "review_replacement_characters"
    elif text:
        state = "text_present_needs_semantic_review"
    elif images:
        state = "image_without_extracted_text"
    else:
        state = "empty_text_needs_review"
    return {"state": state, "characters": len(text), "image_refs": len(images)}
with pymupdf.open() as doc:
    doc.new_page().insert_text((50, 50), "Text sample")
    doc.new_page()
    picture = BytesIO()
    Image.new("RGB", (16, 16), "red").save(picture, format="PNG")
    doc.new_page().insert_image(pymupdf.Rect(10, 10, 100, 100), stream=picture.getvalue())
    assert inspect(doc[0])["state"] == "text_present_needs_semantic_review"
    assert inspect(doc[1])["state"] == "empty_text_needs_review"
    assert inspect(doc[2])["state"] == "image_without_extracted_text"
    assert inspect(doc[2])["characters"] == 0

What the diagnostic checks

  • Text extraction: the diagnose_text_layer function uses get_text("text") to get the raw text.
  • Valid content ratio: it uses unicodedata.category to filter out control characters and whitespace, then calculates the proportion of valid content.
  • Image blocks: it uses get_text("blocks") to detect image blocks on the page.
  • Two assertions: a normal document should have a high printability rate (above 0.9), and a scanned document should have a zero character count. Together they cover the core branching logic.

Note: This diagnostic relies only on statistical features. Encrypted fonts or special encodings still need manual review.

Read the signals and decide what to do next

Each signal suggests a next check, and none of them settles the question alone:

SignalNext checkDo not conclude
Printable text is presentVerify semantics, order and sourceThat extraction being possible means it is correct
Substitute characters are presentLook back at encoding and font mappingThat all characters have been lost
An image is present but no textCheck whether the image contains textThat the page must be a full-page scan
Neither text nor images are detectedView the page renderingThat the page must be blank

Until you have checked, label the document's status as "pending review". An image reference does not prove that the image covers the whole page, and it does not prove that the text in it is recognizable.

Use this checklist before document translation

Before sending a document for translation, work through these steps:

  1. Confirm that the page order is correct.
  2. Confirm that the source locations are correct.
  3. Confirm that the text is complete, using the diagnostic above.
  4. Submit the same sample to the translation process.
  5. After translation, check that headings, body text and figure captions still correspond correctly.

Do not rely only on whether the translated text reads smoothly.

Where OmniDoc fits

OmniDoc translates PDF, Word, PowerPoint and Excel files: scanned pages are recognized first, table cells are translated one by one so tables keep their rows and columns, and a PDF comes back as both a bilingual and a translation-only file. Paid translation adds a glossary and context translation. If you prefer to start from files directly, it is worth evaluating with your own real-world samples.

Reference links and next steps

🎯 Which approach fits you?

If you can view a PDF but cannot copy its text

Run the diagnostic before deciding whether the file needs OCR. A broken mapping and a real scan call for different handling.

If your extracted text looks plausible

Compare it with the visual content of the page. Plausible-looking output can still be wrong, so do not accept it on appearance alone.

If you are preparing a document for translation

Complete the five-step checklist, then verify headings, body text and captions after translation.

❓ FAQ

1. Can I tell whether a PDF is scanned just by selecting its text?

Not reliably. What matters is whether the extracted string is semantically consistent with the visual content, not whether you can select the text.

2. Does an image on a page prove the PDF is a scan?

No. An image reference does not prove that the image covers the whole page or that its text is recognizable.

3. If the diagnostic passes, can I trust the extracted text?

Not automatically. Successful extraction does not guarantee correct text, and encrypted fonts or special encodings still need manual review.

4. Should I run OCR on a PDF that won't copy?

Check first. Running OCR before you know whether the problem is a mapping failure or image content means it runs on an incorrect premise.

📝 Summary

A PDF that displays correctly but won't copy is often a broken text mapping rather than a scan. Check the text layer, compare the extracted text with the visual content, and verify your results before translation or further processing.

Try it now: upload a document and get it translated with the layout intact

Updated 2026-11-29