PDF Content Stream

The core instruction sequence of a PDF page that contains "operators" and "operands" telling the viewer software exactly how to paint text, shapes, and images on the screen.

What is a Content Stream?

A PDF page is not a giant image. Instead, it is more like a set of painting instructions. A **Content Stream** is the script that the PDF "painter" (the viewer software) follows.

When you open a page, the viewer doesn't just "show" it. It reads the Content Stream from start to finish. The stream says things like: "Pick up a blue pen (color). Move to the center of the page (coordinate). Draw a circle (operator). Now pick up a black pen... write 'Hello World' (text operator)." Because of this instruction system, PDFs can be zoomed in forever without losing quality—you are re-drawing the instructions, not blowing up a picture.

Operators and Operands

The language inside a Content Stream is very compact. It consists of numbers (operands) followed by commands (operators). For example:

Why Content Streams are Powerful