How PDF files work: why some have text and some are pictures

PDF was designed in 1993 to do one thing: make a document look the same on every screen and printer. It succeeded so completely that it now carries contracts, scans, forms, invoices and books — and its one-job design explains all the frustrations: why you can't edit it easily, why some PDFs search and others don't, why a "PDF to Word" conversion loses layout. This guide opens the box.

What's inside a PDF

A PDF is a list of pages, each a set of drawing instructions: place this glyph from that font at these coordinates, draw this line, put this image here. Fonts are usually embedded (which is why the file looks identical everywhere), images are stored compressed (JPEG for photos, lossless codecs for line art), and everything is wrapped in a structure of numbered objects with a cross-reference table so a viewer can jump to page 200 without reading the first 199. There is no concept of a paragraph, a column or a table — only positioned marks. That single fact is why PDFs are faithful and why they are hard to edit.

Digital-born PDFs and the text layer

A PDF exported from Word, a browser or LaTeX is "digitally born": its text is real characters placed with real fonts. You can select it, search it, copy it, and a screen reader can speak it. Tools like extract text pull those characters out with their positions, and converters like PDF to Word rebuild paragraphs from the spacing — which works well for prose and badly for tables and columns, because the structure was never there to recover. Fonts can complicate even this: a PDF that uses custom-encoded fonts may render perfectly and copy as gibberish, because the mapping from glyphs to characters was omitted.

Scanned PDFs: pictures of pages

A scanner, a fax gateway or a phone's "scan" feature produces a PDF whose pages are single images. It looks like a document and contains no text at all — selecting yields nothing, search finds nothing, and the file is large (a photo per page). The fix is OCR, which reads the images and adds a transparent text layer over the words, producing a "searchable PDF" — see How OCR works, and why scans read better than photos and the searchable PDF tool. The test is always the same: try to select text. If nothing highlights, it's a scan.

PDF/A, forms and other flavours

PDF/A is the archival profile: everything embedded, no encryption, no JavaScript, no external references, so the file will render identically in fifty years. Government and legal submissions often require it. Forms (AcroForms) add named fields — text boxes, checkboxes, dropdowns — whose values are stored separately from the page drawing, which is how a form filler can write into them and "flatten" them into the page afterwards. Tagged PDF adds a logical structure (headings, lists, reading order) for accessibility; most PDFs lack it. Encrypted PDFs need a password to open, or open freely but forbid printing and copying — restrictions viewers respect and any determined person can bypass, which is worth knowing before relying on them.

Matching the tool to the PDF

All of these run in the browser: pdf.js (Mozilla's renderer) reads and draws pages, pdf-lib writes them, and nothing is uploaded — the right default for documents that are, mostly, private.

Sources and further reading

The claims in this guide rest on these references, which were checked when the guide was last updated. Spotted an error? The contact page says how to report it.

  1. PDF — Wikipedia
  2. PDF/A — Wikipedia

Try the tool

Frequently asked questions

Why can't I search my PDF?

It's a scan — the pages are images with no text layer. Run OCR (the searchable PDF tool) to add one; then search works.

Why does PDF to Word lose the layout?

A PDF stores positioned characters, not paragraphs, tables or columns. Converters must guess the structure from spacing, and complex layouts don't survive the guess.

What is PDF/A?

The archival flavour: fonts embedded, no encryption or scripts, self-contained. Required by many courts and archives so files render identically for decades.

Are PDF password restrictions secure?

An open password (needed to view) genuinely encrypts the file. Permission restrictions (no print, no copy) are honoured by viewers but easily removed — don't rely on them for confidentiality.