Tools — Build it yourself
Write a Real PDF in the Browser
A PDF looks like magic — a document that renders identically everywhere — but the 1.4 version of the format is plain text with strict bookkeeping. Type a few lines above, press the button, and this page assembles a genuine one-page PDF from them, byte by byte, in your browser. No server writes it, no library is loaded, and the download is a file your own input generated on your own device.
The anatomy is five indirect objects. Object 1 is the catalog, the document’s front door. Object 2 is the page tree. Object 3 is the single page itself, naming its size — a 612-by-792-point US Letter sheet — and pointing at its content and its font. Object 4 is the content stream: a short program in PDF’s own drawing language that begins a text block, sets 14-point type, moves to a starting position, and shows your lines one by one. Object 5 declares the font, Helvetica, one of the standard fonts every reader carries built in, which is why this file needs no embedded font data at all.
%PDF-1.4 <- header: the format and its version 1 0 obj ... endobj <- catalog 2 0 obj ... endobj <- page tree 3 0 obj ... endobj <- the page 4 0 obj ... endobj <- content stream (your text, drawn) 5 0 obj ... endobj <- the font xref <- cross-reference table: byte offsets trailer ... startxref <- where the table starts, then %%EOF
The cross-reference table is why offsets must be byte-exact. A PDF reader does not scan the file from the top; it jumps to the end, reads the startxref pointer, and uses the table to leap directly to each object by its byte offset from the first byte of the file. One character added or dropped anywhere upstream — a stray two-byte character where the writer counted one, a newline converted silently — and every later offset points into the middle of the wrong object. That is why the writer on this page restricts itself to single-byte characters and counts as it builds. Honest limits: one page, one built-in font, at most forty lines, and characters outside plain ASCII are replaced with a question mark rather than encoded. Within those limits, the file is fully valid — open it in any reader you like.
Loading the writer…