What a PDF actually is, and why you cannot always copy the text

How a PDF stores glyphs at coordinates instead of words, how to tell a scan from real text, and what fonts, page boxes, rotation flags and passwords do when you merge or split.

A PDF is a list of drawing instructions. It says put this glyph at this coordinate, in this font, at this size, then move here and draw the next one. It does not say this is a heading, this is a paragraph, this column comes before that one. Everything a reader appears to know about the structure of a page has been reconstructed afterwards by measuring gaps between marks, which explains most of what is frustrating about PDFs.

What a PDF actually stores

Text on a page lives in a content stream, a short sequence of operators:

BT
  /F1 11 Tf
  72 708 Td
  [(In) -18 (v) 22 (oice)] TJ
  180 0 Td
  (2026-08-25) Tj
ET

Tf picks a font and size, Td moves the text cursor, and TJ draws glyphs with kerning offsets between them. Note what is missing: no space character anywhere. The gap before the date is a jump of 180 units, and an extractor has to decide whether each jump is a space, a tab, a column boundary or nothing at all. A threshold slightly out gives you Invoice2026-08-25 or I n v o i c e.

Reading order has the same problem: glyphs come out in the order they were drawn. A two column layout often draws the left column down the page and then the right, in which case copying works; if the generator drew line by line across the sheet, copying interleaves the columns into nonsense.

Telling a text PDF from a scan

A scanned document contains no text at all: it is a photograph of a page wrapped in a PDF. Optical character recognition adds an invisible text layer over the picture, which makes the file searchable, but that layer is a guess, so its errors surface as failed searches and mangled copies.

CheckText PDFScanned PDF
Select a wordHighlights character by characterNothing selects, or the whole page does
Zoom to 400%Letters stay sharpLetters go soft or blocky
Size per pageOften 20 to 100 KBOften 300 KB to several MB
Extract Images from PDFReturns the real pictures, or nothingReturns one full page image per page

Fonts, embedding and subsetting

A font is either embedded, meaning the font program sits inside the file, or referenced by name and metrics, so the reader finds something similar on the machine displaying it. Referenced fonts are why a document looks correct where it was made and wrong elsewhere: the substitute has different character widths, so lines rewrap, tables spill and a one page letter becomes two.

Embedded fonts are almost always subsetted. Only the glyphs used are included, and they are frequently renumbered, so the glyph for A might sit at code 3. The mapping back to real characters lives in a separate ToUnicode table, and when it is missing or wrong the page renders perfectly while the copied text arrives as gibberish, because you are handed internal glyph codes rather than characters. Re-saving will not repair it; the routes out are the source document or recognition over rendered pages.

Page size, boxes and rotation

Coordinates are in points, at 72 to the inch, and every page carries several rectangles. The MediaBox is the full sheet; the CropBox is the region actually displayed, which can be smaller.

SizePointsMillimetres
A4595 x 842210 x 297
Letter612 x 792216 x 279
Legal612 x 1008216 x 356

A4 and Letter look identical on screen and differ on paper, so merging a European report with an American one gives pages that alternate in size.

Each page also carries a rotation flag of 0, 90, 180 or 270 degrees, so content stored sideways can be shown upright. Rotate PDF sets that flag rather than redrawing anything, which makes it instant and lossless, but the coordinates underneath are unchanged: a tool that ignores the flag extracts text sideways, and merging pages with mixed flags gives a document that looks consistent while its content sits in several orientations.

Merging, splitting and the parts that break

Pages live in a page tree. Merge PDF copies page objects and everything they reference into one file and rebuilds that tree; Split PDF takes a branch of it. The pages come through intact, what is attached to the document does not always.

  • Bookmarks are a separate outline pointing at page objects. Many merge tools drop it entirely, and splitting leaves entries aimed at pages that are no longer there.
  • Form fields are named at document level, not page level, so merging two copies of one form gives two fields called name, which many readers treat as one field with a shared value: filling in one fills the other. Flatten or rename them first.
  • Annotations such as links and comments ride along with their pages, but an internal link whose target page was left out of a split has nowhere to go.

A merged file is often larger than its parts because shared resources get duplicated: four sources that each embedded a subset of the same font give four subsets, plus four colour profiles and four metadata blocks. It can also come out smaller, because rewriting discards unused objects and save history: a document saved thirty times carries every earlier revision appended to it.

Passwords, permissions and tags

There are two kinds of password and they are not comparable. A user password is required to open the document: the content is genuinely encrypted with a key derived from it, so without it there is nothing to read. Modern files use AES-256, very old ones 40 bit RC4, which is weak.

An owner password sets permission flags such as no printing, no copying and no editing. The file is still encrypted, but with a key any reader can derive unaided, because the user password is empty. The flags are a request, honoured by some readers and ignored by others: if a file opens without prompting, its restrictions are advisory, whatever the properties dialogue says.

Tagging is a different layer: an optional structure tree marking headings, lists, table cells and figure descriptions, and fixing a reading order. A screen reader on a tagged PDF reads the document; on an untagged one it guesses from coordinates, producing the same jumbled result as copy and paste. Scans are untagged by definition, recognition adds text but no structure, and output from Images to PDF or PDF to Images has neither.

Where the size is, and what the browser can hold

File size is almost always images. An A4 page needs roughly 1240 by 1754 pixels at 150 dpi and 2480 by 3508 at 300 dpi, so a photograph placed at 12 megapixels carries far more data than printing can use, and downsampling is the only change that reliably shrinks a document. Re-saving a text only PDF gains very little, because its content streams are already compressed; when one is unexpectedly large, look at embedded fonts, save history or attachments.

All of this happens locally in the browser, so nothing is uploaded and the limit is memory rather than file size. Rendering is the expensive part: an A4 page at 4x scale is about 2380 by 3368 pixels, roughly 32 MB of uncompressed bitmap for one page, so fifty pages at that scale exhaust a browser tab long before they trouble the machine. Split a very large document first, then work in batches.