linearised PDF

A linearised PDF is written so that its first page can be shown before the whole file has been received.

In more detail

A PDF is ordinarily written back to front: the table saying where everything sits is at the end of the file, so a program has to reach the end before it can find the beginning. Down a network that means waiting for the last byte before drawing the first page.

Linearising moves everything page one needs to the front, and puts a second table there with it. A program that knows the arrangement reads the head of the file, draws page one, and fetches the rest while the reader is busy with it. A program that does not know it reads the file the ordinary way and loses nothing.

What it does on a real document

A catalogue of two hundred pages weighs a few million bytes. Opened from a link, an ordinary one shows nothing at all until the whole of it has come down; a linearised one shows its cover almost at once, and fills in the rest behind.

Nothing else changes. The same pages, the same lettering, near enough the same weight. The gain is felt only when the document is read as it arrives, which is what happens every time somebody opens it from a website rather than from their own machine.

Where it comes from, and why

The arrangement was added to the format in 1996, when documents began to be read down a telephone line rather than off a disk. It was written for a reader who is waiting, and it is the reason a heavy document on a website can start showing itself while it is still coming.

Browsers now carry reading software of their own, and they use it. The arrangement is thirty years old and it is still the only answer anybody has to the question of what to show first.

See it on a finished document

Showing page one before the file has arrived

Back to the whole glossary