File formats

How a PDF Stores Text and Why Copying Goes Wrong

PDF files store glyphs placed by position and not sentences. That one design explains most copy and paste problems.

6 min read

How a PDF stores text explains why copied words come out wrong. PDF pages hold glyphs placed by position and not sentences. Fonts draw the glyphs you see on screen. ToUnicode maps tell copy and search what each glyph means. Copying breaks when that map is missing or wrong. Scanned PDFs hold only an image until OCR adds a text layer. Tagged PDFs add a structure layer that sets the reading order. Paste one word into a text editor to test the file.

PDF files do not store text the way a word processor does. They store instructions that draw glyphs at set positions on a page. That design explains most copy and paste problems.

Your screen shows glyphs from a font. Copy and search read a separate map from glyphs to characters. Nothing forces the two to agree, so a page can look perfect and paste as symbols.

What Does a PDF Store Instead of Text?

A PDF stores drawing instructions and not paragraphs. According to the ISO 32000-1 specification, a text object begins with BT and ends with ET. Inside it the Tj operator shows a string as a sequence of character codes that identify glyphs in a font. Positioning operators set where those glyphs are painted.

BT
/F1 12 Tf
72 700 Td
(Hello world) Tj
ET

This simplified example selects a font, moves to a position and shows one string. The section of the specification on text objects does not mention paragraphs. A reader that wants a sentence must rebuild it from strings and positions.

The specification also notes that text extraction works best when strings are long and shown in natural reading order. Nothing requires a file to follow that advice.

Why Does Copied PDF Text Come Out as Symbols?

Display and copying use two different lookups. The font turns each character code into a glyph shape for the screen. Copy and search need a character instead and take it from a separate map.

The specification calls that map the ToUnicode entry. It is a stream that maps character codes to Unicode values. When none of the specified methods gives a Unicode value the reader may choose a character code of its own. Adobe states that extraction fails if Acrobat cannot determine how to map the font to Unicode characters.

The result is a page that looks correct and pastes as symbols. For the wider idea of codes and characters see character encoding explained.

One character code, two lookups One character code in the page data feeds two lookups. The font draws the glyph shown on screen. The ToUnicode map supplies the Unicode character that copy and search return. Character codein the page data What you see Font Glyph shown on screen What you copy ToUnicode map Unicode character A missing or wrong map gives symbols while the page still looks right
One character code feeds two separate lookups. The font draws the glyph you see and the ToUnicode map supplies the character that copy and search return.

What Causes Common PDF Copy Problems?

Most copy problems trace back to one of four facts about the file.

SymptomWhat happened in the file
Symbols or random lettersThe ToUnicode map is missing or wrong
Nothing highlightsThe page is an image with no text layer
Words paste in the wrong orderThe strings are not drawn in reading order
Lines break in the middle of a sentenceStrings drawn line by line carry their breaks into the paste

Why Does a Scanned PDF Copy Nothing?

A scanned PDF holds a picture of the page. Adobe states that a scan contains only image data and not searchable text. Optical character recognition converts the image text into selectable and searchable text and adds a text layer to the file.

OCR reads pixels and recognizes character patterns. Its mistakes therefore follow how letters look. A smudged l can become a 1 and the file stores that wrong character.

What Do Tagged PDFs Change?

Tagged PDFs add a structure layer on top of the drawing instructions. Adobe states that PDF tags indicate which text is a heading and which content makes up a section. Assistive software depends on these tags to find the reading order.

The W3C technique PDF3 says the tag order primarily sets the reading order of a PDF. It also warns that pages with complex layouts such as tables and sidebars may not convert to tagged PDF in the correct order. A tagged file extracts more cleanly than an untagged one and still needs a check.

How Do You Check How a PDF Stores Its Text?

  1. Try to select one word. Adobe states that a page where you cannot select text is likely a scan.
  2. Copy that word and paste it into a plain text editor. Symbols mean the mapping failed.
  3. Open Document Properties and look at the Tagged PDF value in the Advanced pane of the Description tab.
  4. Paste a two column page into the editor. Words from both columns in one line mean the strings are not in reading order. Copy one column at a time instead.
  5. Select All tools, then Scan & OCR, then Recognize text for a scan. Check the result against the page.
  6. Ask the sender for the original file when symbols remain. A fresh export from the source program writes a new mapping.

Closing Words

People assume the text they see is the text the file holds. The two are separate. The safe step is to paste one word into a text editor before you trust a PDF. Run OCR on scans and ask for a fresh export when symbols appear.

Key Takeaways

  • How a PDF stores text explains most copy problems because the file holds positioned glyphs and not sentences.
  • The font draws what you see and the ToUnicode map decides what copy returns.
  • A scanned PDF holds only an image until OCR adds a text layer.
  • Tagged PDFs add structure and reading order and still need a check.
  • Pasting one word into a text editor tests a file in seconds.

Checked against the ISO 32000-1 specification, Adobe Acrobat Help and the W3C WCAG technique PDF3 on 20 November 2026.

Questions People Ask

7 questions, answered in full below.

Why does copied PDF text turn into symbols?

The font draws the glyphs and a separate ToUnicode map feeds copy. Symbols appear when that map is missing or wrong.

Does a PDF store paragraphs?

No. It stores strings of character codes with positions. The text section of ISO 32000-1 does not mention paragraphs.

How can you tell whether a PDF is a scan?

Try to select one word. A page where nothing highlights is likely an image. Adobe gives the same test.

Does OCR copy the text exactly?

No. OCR recognizes character patterns so its mistakes follow how letters look. Check the result against the page.

What is a tagged PDF?

A tagged PDF has a structure layer that marks headings, sections and reading order. Open Document Properties and read the Tagged PDF value to check.

Why does PDF text paste in the wrong order?

The file draws its strings in a different order than you read them. Tags set the reading order where they exist. Copy one column at a time where they do not.

Can you repair garbled PDF text yourself?

Not reliably. The ToUnicode map lives inside the file. Ask the sender for the original file or a fresh export.

Sources

Where the facts described above were checked.

  1. PDF 32000-1:2008 specification, sections 9.4 and 9.10 ISO 32000-1, Adobe copy
  2. Accessibility features in PDFs Adobe
  3. Recognize text in scanned documents Adobe
  4. Technique PDF3: Ensuring correct tab and reading order in PDF documents W3C