Fonts kept inside the file
Text set in a font the file carries inside it, cut down to the letters actually used.
The smallest complete file: a page, and shapes drawn on it.
The smallest complete file the library writes: a document, a page added to it, a handful of shapes drawn on that page, and the bytes on disk. If you are reading the examples in order, this is where they start — everything else on this site adds to this skeleton rather than replacing it.
It exists for a second reason too. A unit test can only say one thing: the file looks right to whoever has just written it. Whether it really is a PDF only a reader can answer, so this file is what the engine's validity check opens.
The same document is written twice, once in each language. Both files are shown in full, with the code coloured on the server, and can be copied in one click.
The document this example writes, ready to open.
This document weighs 14,752 bytes, and weighed exactly as much before.
This document draws shapes and not one word, so it carries no font at all and there was nothing in it to take out. See every document measured.
Text set in a font the file carries inside it, cut down to the letters actually used.
A landscape certificate whose border and seal are drawn line by line rather than placed as pictures.
A boarding pass carrying the IATA BCBP string a gate scanner reads.
A sheet of die-cut shelf labels, priced and barcoded, with cut marks in the margins.
A paragraph broken into lines, set four ways: left, right, centred, justified.
A word too wide for its column: left whole, or cut to the edge.