PDF Export
PDF Export
Sometimes you need your talk as a file you can email, print, or upload — not a live app. Tachyonn exports any .tac deck to a PDF from the command line, and it does something most tools don't: it preserves your animations.
The basics
Run the export command with your file:
tachyonn export my-talk.tacThat's it. Tachyonn writes the PDF next to your source file, so my-talk.tac produces my-talk.pdf.
To choose a different output path, use --output (or -o):
tachyonn export my-talk.tac --output ~/Desktop/talk-final.pdfAnimations become pages
This is the part worth understanding. On screen, a slide with step-by-step reveals shows a little more each time you press →. In a normal PDF export you'd lose all of that — you'd get a single page with everything already visible, which spoils the build-up.
Tachyonn handles it differently. For a slide with animations, it writes one page per reveal step. So a slide that reveals three bullets one at a time becomes:
- Page 1: the slide with nothing revealed yet
- Page 2: the slide with the first reveal shown
- Page 3: the slide with the second reveal shown
- Page 4: the slide fully revealed
The result is a PDF that tells the same progressive story your live presentation does — ideal for handouts where the pacing matters.
A slide with no animations is exported as a single page, exactly as you'd expect.
Page numbers stay sensible
The footer's {page} number reflects the logical slide number, not the raw PDF page. So all of a slide's animation pages share the same {page} value — your audience-facing numbering stays clean even though the PDF has more physical pages.
What the pages look like
Every page is a full 16:9 slide at 1280×720 (the same canvas Tachyonn uses on screen), with backgrounds, fonts, colors, and footers all preserved. Your theme carries over untouched.
How it works (and what you need)
Under the hood, export briefly renders your deck in a headless browser and prints it to PDF — the same approach tools like Slidev use. Two practical notes:
- You need a Chrome or Chromium browser installed on your machine. Tachyonn finds it automatically.
- The browser and the temporary local server are used only during export. They're not part of presenting — your live presentation stays fully offline, exactly as before.
Command options
| Option | Default | Description |
|---|---|---|
--output, -o | <input>.pdf | Where to write the PDF |
--port | 3732 | Port for the temporary render server (change it only if that port is busy) |
--max-image-width | the deck's imageMaxWidth (2560) | Largest side, in pixels, that photos may have in this PDF. 0 embeds them at full resolution |
Why the PDF is (or isn't) heavy
In a real deck, 97% of the PDF is images. Two things used to make that
number explode, and Tachyonn now handles both — with no flag to remember.
Format. A PNG goes into a PDF as a lossless bitmap: a 1920×1280
illustration costs 5.9 MB there, against ~250 KB for the same picture as
JPEG. Since most PNGs carry an alpha channel that is entirely opaque (that's
just what image editors export), Tachyonn checks the pixels — not the channel —
and re-encodes to JPEG when there is no real transparency. Images that are
transparent stay PNG.
Resolution. A phone photo is 4000+ px wide; a slide is 1280. Anything pastimageMaxWidth (1920 px by default) is scaled down first.
A 51-slide lecture with 30 images, unchanged otherwise:
| Size | |
|---|---|
| Before | 28.8 MB |
| Now (default) | 4.8 MB |
Nothing that this would ruin is touched: SVG stays vector, GIF keeps its
animation, video is left alone. And if the re-encode ever comes out bigger
than the original, the original is kept.
The optimized copies are cached in img/.cache/resized/, so the cost is paid
once: a deck that takes 2.5 s to compile with fresh photos takes 0.02 s on the
next save — the preview's hot reload stays instant.
When you want maximum quality instead
The default is the light PDF. Ask for the heavy one explicitly:
tachyonn export lecture.tac --max-image-width 0 # images exactly as they are===
imageMaxWidth: off // same thing, deck-wide (app, preview and exports)
===Or tune it: imageMaxWidth: 2560 for a 4K projector, imageQuality: 92 for a
gentler JPEG, --max-image-width 1280 for the smallest file you can send by
e-mail. The export flag wins over the frontmatter, and only for that run —
so the PDF you share can be lighter than the deck you present.
# Full example
tachyonn export slides/lecture.tac -o build/lecture.pdf --port 4000Exporting straight from the preview
While you're writing in preview mode, you don't need to drop to the terminal. Open the preview tools menu (the ☰ button) and choose Exportar PDF — Tachyonn opens the print view and your browser's print dialog, where you pick Save as PDF. Animation steps expand into pages here too, just like the CLI.
The command line stays the better choice for scripts and reproducible builds; the preview button is the quick path while drafting.