---
title: "PDF"
description: "Export a deck to PDF."
---

> Documentation Index
> Fetch the complete documentation index at: https://sandrinodm.github.io/deckster/llms.txt
> Use this file to discover all available pages before exploring further.

# PDF

`deck export --pdf` turns a deck into a PDF you can send, print or hand out: one vector page per slide, with its links, bookmarks and fonts. After this page you can export the whole deck, a subset, every step, or a version with speaker notes.

## Export a PDF

1. Export the deck:

   ```console
   $ deck export launch-review --pdf
   /Users/you/talks/.deck/exports/launch-review/launch-review.pdf (3 pages, 3 bookmarks, 0 slide links, 0 external links)
   ```

   The line names the file and counts its pages, bookmarks, links to other slides and links to the web. The command prints an absolute path; it is shortened to `/Users/you/talks` on this page.

2. Open `.deck/exports/launch-review/launch-review.pdf`.

Without a format flag, `deck export launch-review` writes the PDF and the PowerPoint file side by side (see [PowerPoint](https://sandrinodm.github.io/deckster/export-and-publish/powerpoint/)). `--png` writes the slide pictures that [`deck shot`](https://sandrinodm.github.io/deckster/review/screenshots/) takes, in a `png/` folder inside the export folder. Export needs Chromium: `npx playwright@1.65.0 install chromium`.

## Where it goes

| You pass | The PDF is written to |
| --- | --- |
| nothing | `.deck/exports/<deck>/<deck>.pdf` |
| `--brand <name>` | `.deck/exports/<deck>@<name>/<deck>.pdf`, rendered with `brands/<name>` |
| `--out <folder>` | `<folder>/<deck>.pdf` |
| `--out <file>.pdf` | that file (only when you export the PDF alone) |

Exporting again overwrites the file.

## What is in it

The PDF is printed by Chromium from the deck in [static mode](https://sandrinodm.github.io/deckster/concepts/static-mode-and-readiness/), the same rendering `deck shot` and `deck lint` use:

- **One page per slide, at its last step**, with everything revealed.
- **Vector pages**: text stays text and charts stay shapes. The 1920x1080 canvas is set on 1440x810 pt pages (20x11.25 in).
- **Fonts embedded**, so it looks the same on a machine without the brand's fonts.
- **Links**: links to the web, and links from one slide to another, stay clickable. [Links](https://sandrinodm.github.io/deckster/write-slides/links/) covers how to write both.
- **A bookmark and a page label per slide**, so a PDF viewer's sidebar lists the slides.
- **Tagged for screen readers**, with the deck title as the document title and the brand's language as its language.
- **Posters for live media**: videos, iframes and apps show their poster image. Without a poster, live media exports as a stray frame or nothing; `deck lint` warns about that (`export-missing-poster`).

## One page per step

`--steps` prints a page for every step of every slide, so the reader sees each reveal in order. The hello deck from the repository (copy `decks/hello/` into your workspace and delete its `package.json` and `tsconfig.json`; see [the hello deck](https://sandrinodm.github.io/deckster/examples/hello/)) has 4 slides and 8 steps:

```console
$ deck export hello --pdf --steps --out handout.pdf
/Users/you/talks/handout.pdf (8 pages, 4 bookmarks, 0 slide links, 0 external links)
```

There is still one bookmark per slide, at its first page.

## A subset of slides

`--slides` takes a comma-separated list of 1-based numbers, ranges and slide ids, such as `3,5-9` or `title,risks`:

```console
$ deck export launch-review --pdf --slides title,risks --out two.pdf
/Users/you/talks/two.pdf (2 pages, 2 bookmarks, 0 slide links, 0 external links)
```

A number outside the deck is an error:

```console
$ deck export hello --pdf --slides 9
--slides: "9" is outside the deck: slides are numbered 1 to 4.
Run `deck export --help` for the usage.
```

## Hidden slides

New in 0.5.0. A slide with `hidden: true` is not in the talk, so the export leaves it out of the PDF and says how many it left out. This `launch-review` deck has a fourth slide, `pricing-backup`, that is hidden (see [hidden slides](https://sandrinodm.github.io/deckster/write-slides/hidden-slides/)):

```console
$ deck export launch-review --pdf
/Users/you/talks/.deck/exports/launch-review/launch-review.pdf (3 pages, 3 bookmarks, 0 slide links, 0 external links)
1 hidden slide left out (add --include-hidden to export).
```

`--include-hidden` puts hidden slides in as ordinary pages, with a bookmark each, in the order of the slide list:

```console
$ deck export launch-review --pdf --include-hidden --out handout.pdf
/Users/you/talks/handout.pdf (4 pages, 4 bookmarks, 0 slide links, 0 external links)
```

A hidden slide that `--slides` names is exported without the flag, also inside a range such as `3-4`. A selection is your choice of slides, so no line about hidden slides follows it:

```console
$ deck export launch-review --pdf --slides risks,pricing-backup --out backup.pdf
/Users/you/talks/backup.pdf (2 pages, 2 bookmarks, 0 slide links, 0 external links)
```

Slide numbers in `--slides` count every slide, hidden ones included. `deck export --png` follows the same rules, while `deck shot` shoots every slide.

## Speaker notes pages

`--notes` adds a notes page per slide (the slide with its notes) after the slides, under one more bookmark, "Speaker notes":

```console
$ deck export launch-review --pdf --notes --out notes.pdf
/Users/you/talks/notes.pdf (6 pages, 4 bookmarks, 0 slide links, 0 external links)
```

The notes come from each slide's `<Notes>` block; see [Speaker notes](https://sandrinodm.github.io/deckster/write-slides/speaker-notes/). `--notes` combines with `--slides`.

How the PDF is put together, beside the PowerPoint export, is drawn on the [PowerPoint](https://sandrinodm.github.io/deckster/export-and-publish/powerpoint/) page. To put the PDF online next to the deck, see [Build and host](https://sandrinodm.github.io/deckster/export-and-publish/build-and-host/) (`--with-exports`).

Source: https://sandrinodm.github.io/deckster/export-and-publish/pdf/index.mdx
