| 1 | --- |
| 2 | name: pdf |
| 3 | description: Include downloadable PDF in SPA build |
| 4 | --- |
| 5 | |
| 6 | # Generate PDF when Building |
| 7 | |
| 8 | Generate a downloadable PDF alongside your built slides. |
| 9 | |
| 10 | ## Enable in Headmatter |
| 11 | |
| 12 | ```md |
| 13 | --- |
| 14 | download: true |
| 15 | --- |
| 16 | ``` |
| 17 | |
| 18 | This generates a PDF and adds a download button to the built slides. |
| 19 | |
| 20 | ## Custom PDF URL |
| 21 | |
| 22 | Skip generation and use an existing PDF: |
| 23 | |
| 24 | ```md |
| 25 | --- |
| 26 | download: 'https://example.com/my-talk.pdf' |
| 27 | --- |
| 28 | ``` |
| 29 | |
| 30 | ## CLI Option |
| 31 | |
| 32 | ```bash |
| 33 | slidev build --download |
| 34 | ``` |
| 35 | |
| 36 | ## Export Options |
| 37 | |
| 38 | Configure PDF export settings via: |
| 39 | - CLI: `slidev build --download --with-clicks --timeout 60000` |
| 40 | - Headmatter: Set `exportFilename`, `withClicks`, etc. |
| 41 |