~/talk

Taking Generators Too Far: Writing a PDF from Scratch in Python

recording removed on YouTubehttps://youtu.be/WqdUOt0TRP0
Talkat PyCon US 2026 · 2026-05-13..05-19· [frontend-architecture]
slides:none on file

Claim: a small Python PDF writer streaming every byte using generators produces complete PDFs in constant memory; tools actually used include the standard library deflate compressor for zlib streaming, generator return values to report compressed lengths, and itertools-like pairwise sliding windows to insert cing kerning table adjustments. Surprises: forward references and the XREF offset list force tricks (deferred length objects and a tiny final table), and the result works with one modest exception: a small accumulated XREF index.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.