Why text copied from a PDF turns into garbage characters
Short answer: Displaying text and copying it use different information in the PDF. The page draws the right shapes, but the map from shapes to characters is missing or wrong, so copy, search and extraction get other characters. Try another viewer first; if all give the same garbage, get the original file or run OCR on those pages.
What is going on
A PDF stores two separate things for each piece of text:
- Which shapes to draw (glyphs from a font) — this is what you see.
- Which characters those shapes stand for (a character map, often a table called ToUnicode) — this is what copy, search, screen readers and text extraction use.
If the second part is missing or wrong, the page looks perfect while copying gives other characters. The PDF Association’s note (linked below) describes the same split: the font finds the right glyph, the character lookup does not.
Three quick checks
Pick one short line with letters, digits and punctuation, and use it for every test.
- Paste into Notepad (or TextEdit in plain-text mode), not Word. If Notepad shows it correctly and Word does not, this line can be recovered as plain text, and the problem is on the Word side: its paste conversion or a font without these characters. In Word, paste with Keep Text Only, then choose a font that has the characters. This tests one line only; check other parts of the file the same way.
- Copy the same line in a second viewer (a browser, Acrobat Reader, Preview). If one viewer gets it right, use that one; the file’s map may be incomplete in a way only some viewers work around.
- Extract it with the PDF text extractor (in your browser, no upload). If the same garbage comes out everywhere, the map in the file is wrong.
Try it: a file with a wrong map
broken-text-mapping.pdf is a one-page delivery note whose character map we deliberately replaced with a wrong one. On screen it reads normally. Extracted with our text extractor (Chromium, 12 November 2026), the first lines come out as:
| On the page | Copied / extracted |
|---|---|
| Example Trading Ltd. — Delivery notice | I|eqtpi$Xvehmrk$Pxh2$í$Hipmziv}$rsxmgi |
| Order number: ET-2026-0417 | Svhiv$ryqfiv>$IX1646:1485; |
Here every character is shifted the same way (spaces became $, 0 became 4) because we built the wrong map that way. In files you receive, the garbage may look random, appear as boxes or question marks, or be missing altogether — the cause is the same. The text-layer check still reports “Text found” for this page, because there is text; only its meaning is wrong. The correct version of the same page copies normally.
What works
| Situation | What to do |
|---|---|
| One viewer copies correctly | Use that viewer for the text you need, and check the result |
| You can get the source (Word, InDesign, the sender) | Ask for the original or a new export; this gives exact text |
| Only the PDF exists | Run OCR on the affected pages: Make PDF searchable with Redo page replaces the broken text layer with a recognised one; or PDF OCR gives you the text to copy |
| A few words only | Retype them; it is faster than any repair |
OCR reads the shapes, so it does not depend on the broken map — but it can misread characters. Proofread numbers, names and amounts.
What does not work
- Installing fonts: the shapes are already right.
- “Repair PDF” functions: they fix file structure, not a wrong meaning of characters.
- Converting to Word without OCR: the converter reads the same wrong map.
If the text is not garbled but you cannot select or copy it at all, see why you can’t copy text from a PDF.
FAQ
Will installing the font fix it?
Usually not. The font is normally embedded in the PDF and the page displays correctly already; what is wrong is the map from the drawn shapes to characters. Installing a font changes neither.
Can the PDF be repaired so copying works?
Only if the correct mapping can be worked out, which normally means having the original file. When the mapping is simply wrong, a tool cannot guess which shape means which character; OCR reads the shapes instead.
Copied text has correct letters but odd line breaks or mixed-up columns. Is that the same problem?
No. That is reading order: the text is right but extracted line by line or across columns. Paste as plain text and fix the breaks, or use PDF to Markdown, which joins lines into paragraphs for simple layouts.
Sources
- PDF Association / callas software: "The text copied from the PDF could not be pasted correctly" · Checked on 2026-11-12