What a PDF is and why it looks the same everywhere

How the PDF format stores a document, what makes it reliable for sharing and printing, and where its limits are.

Updated

PDF stands for Portable Document Format. A PDF describes a set of fixed pages: exactly where each letter, line and image goes. Because the layout is stored rather than worked out again by each program, a PDF looks the same on any device and prints the way it appears on screen. That is its purpose, and also the reason it is awkward to edit.

Where it came from

Adobe introduced PDF in 1993. In 2008 it became an open international standard, ISO 32000, so any software maker can read and write the format.

What is inside a file

  • Pages, each with its own size. Page dimensions are measured in points, 72 to an inch.
  • Text, stored as characters positioned on the page, together with the fonts needed to draw them. Embedding the fonts is what keeps the text looking right on a computer that does not have them installed.
  • Vector graphics, such as lines and shapes, which stay sharp at any zoom.
  • Images, stored in compressed form. JPEG data can be stored as it is.
  • Extras for the document as a whole: bookmarks, links, form fields, properties such as title and author, and optional encryption.

Two kinds of PDF that look alike

  • A PDF exported from a word processor or web page contains real text. You can select it, search it and have it read aloud.
  • A PDF made from a scan or a photo contains pictures of pages. It has no text unless optical character recognition has added a hidden text layer.

Try to select a sentence. If you cannot, the page is an image. See JPG to PDF.

Why editing is hard

A PDF records where things are, not how they relate. There is often no stored idea of a paragraph, a column or a table, only positioned runs of characters. Changing a sentence does not make the rest of the page reflow as it would in a word processor. For anything beyond small fixes, edit the original document and export again.

Standards within the standard

  • PDF/A is for long-term archiving. It requires fonts to be embedded and forbids features that depend on outside resources, including encryption.
  • PDF/X is for exchanging files for professional printing.
  • PDF/UA sets requirements for accessibility, built on tagged PDF, which records the reading order and structure for assistive technology.

Passwords

A PDF can have two kinds. A password to open the file encrypts its contents. A permissions password asks software to restrict actions such as printing or copying, but the file can still be opened and read without it.

Related

See merging PDFs and splitting a PDF for what happens when files are combined or divided.