PDF file format guide

What a PDF file contains, how it's structured, and why certain operations are easy while others aren't.

The basics

PDF (Portable Document Format) is a file format for representing documents in a way that looks identical on any device. It was standardized as ISO 32000 and is maintained by the PDF Association. Every modern operating system, web browser and mobile device can open a PDF.

What's inside a PDF

A PDF file is a structured binary document containing several kinds of objects:

Why editing in place is hard

The content stream is a sequence of drawing instructions like "move to (100, 200), set font to Helvetica 12, draw the text 'Hello'." There's no model of sentences or paragraphs — just positioned glyphs. Changing "Hello" to "Hi" requires:

  1. Finding the glyph group that spells "Hello"
  2. Removing those glyphs from the stream
  3. Inserting new glyphs with different advance widths
  4. Adjusting the positions of everything after them on that line
  5. Checking the line still fits within the column

Multiply that by every change you want to make. This is why Acrobat's "Edit Text" mode is fragile, why scanned PDFs can't be edited this way at all, and why most browser tools — including Omni PDF — work in additive mode instead.

What you can safely do to any PDF

What requires special handling

Glossary

Content stream
The instructions that draw a page.
XObject
A reusable object — usually an image or a form (a group of drawing instructions).
AcroForm
The interactive form layer, with fillable fields.
Flatten
Converting annotations or form fields into page content so they become permanent.
Redaction
Permanently removing content from a PDF. Requires rebuilding the page, not just covering.
Linearization
Reordering a PDF so the first page loads before the whole file is downloaded.

Ready to work with a PDF?

Open PDF Editor