pitch2pdf-cli
v1.0.0
Published
Command-line tool to convert Pitch, DocSend, Google Slides, Google Drive, Google Docs, Canva, Prezi, and Presentations.AI decks to PDF.
Maintainers
Readme
pitch2pdf-cli
Convert presentations to PDF from the command line. The official CLI for pitch2pdf.com.
Point it at a presentation URL and it captures every slide and saves a PDF — no browser, no manual screenshots.
Supported services
- Pitch (
pitch.com, including white-label domains) - DocSend
- Google Slides, Google Drive, Google Docs
- Canva
- Prezi
- Presentations.AI
Install
npm install -g pitch2pdf-cliThis installs the pitch2pdf command.
Usage
pitch2pdf <url> [options]Examples
# Convert a deck to <slug>.pdf in the current directory
pitch2pdf https://pitch.com/v/my-deck-abc123
# Choose the output path
pitch2pdf https://pitch.com/v/my-deck-abc123 -o ~/Desktop/deck.pdf
# Pipe the PDF to stdout
pitch2pdf https://pitch.com/v/my-deck-abc123 -o - > deck.pdf
# Password-protected presentation
pitch2pdf <url> --email [email protected] --password secret
# Machine-readable progress (NDJSON on stdout)
pitch2pdf <url> --jsonOptions
| Option | Description |
| --- | --- |
| <url> | Presentation URL to convert (required) |
| --email <email> | Email for password-protected presentations |
| --password <password> | Password for protected presentations |
| -o, --output <path> | Output file path (use - for stdout) |
| --json | Emit NDJSON progress events to stdout |
| --no-progress | Suppress progress output |
| --api-url <url> | API base URL (default https://api.pitch2pdf.com) |
| -V, --version | Print the version |
| -h, --help | Print help |
Environment variables
Credentials and the API base URL can be supplied via the environment instead of flags:
| Variable | Equivalent flag |
| --- | --- |
| PITCH2PDF_EMAIL | --email |
| PITCH2PDF_PASSWORD | --password |
| PITCH2PDF_API_URL | --api-url |
Exit codes
| Code | Meaning |
| --- | --- |
| 0 | Success |
| 1 | Generic / HTTP / invalid-response error |
| 2 | Network error |
| 3 | Authentication required or failed |
| 4 | Blocked by bot protection |
| 5 | Timeout |
| 6 | Progress stream dropped |
| 7 | PDF download failed |
| 130 | Interrupted (Ctrl-C) |
Free vs. full deck
The CLI produces a free PDF: the first 10 slides at full resolution, with the rest included as thumbnails. To unlock the full deck at full resolution with searchable OCR text, upgrade at pitch2pdf.com.
License
ISC
