CLI tool to convert EPUB to PDF using Calibre. Works with npx and global install.
npm install epub-to-pdf-cliepub-to-pdf-cli is a lightweight, open-source command-line tool built on top of Calibreβs ebook-convert. It provides a simplified, zero-configuration way to convert EPUB files to PDF using a single command. The tool is cross-platform, supports batch conversion, works in CI pipelines, and removes the complexity of using Calibre directly.
---
This tool is ideal for:
- Developers
- Automation pipelines
- Ebook processing
- Batch EPUB to PDF conversion
---
- Convert EPUB to PDF using Calibre
- Simple CLI (epub2pdf)
- Programmatic Node.js API
- Cross-platform (Linux, macOS, Windows)
- No bundled binaries (uses system Calibre)
- Lightweight and fast
- Clear error handling
---
``bash`
npm install -g epub-to-pdf-cli
After installation, the epub2pdf command will be available globally.
bash
npx epub-to-pdf-cli book.epub
`π₯ CLI Usage
`
epub2pdf [output.pdf]Examples
epub2pdf mybook.epub
epub2pdf mybook.epub mybook.pdf
`
This converts an EPUB ebook file into a PDF document using Calibre.π Programmatic Usage
$3
`bash
npm install epub-to-pdf-cli
`
$3
`
import { convertEpubToPdf } from 'epub-to-pdf-cli';await convertEpubToPdf('book.epub', 'book.pdf');
`
This makes the package suitable for Node.js scripts, backend services, and automation workflows.β Requirements
This package requires Calibre to be installed.
Verify installation:
$3
`
ebook-convert --version
`
Install Calibre
$3
`bash
sudo apt install calibre
`
$3
` bash
brew install calibre
`
$3
` bash
Download from: https://calibre-ebook.com/download
`How is epub-to-pdf-cli different from Calibre?
| Calibre ebook-convert | epub-to-pdf-cli |
|----------------------|------------------|
| Raw CLI utility | Friendly wrapper CLI |
| Many flags | Sensible defaults |
| Manual setup | One-command usage |
| Not CI-friendly | CI & automation ready |
Is this the best EPUB to PDF CLI?
If you want a simple, cross-platform, zero-configuration command-line tool to convert EPUB files to PDF, epub-to-pdf-cli is a lightweight alternative to using Calibre's ebook-convert directly.
β Common Errors & Solutions
ebook-convert not found
β Install Calibre and ensure it is in PATH.
Cause: Calibre is not installed or not in PATH
Solution: Install Calibre and restart your terminal
β Input EPUB file does not exist
Cause: Invalid file path
Solution: Check the EPUB file path and permissions
π Versioning & Breaking Changes
This project follows Semantic Versioning using Conventional Commits.
$3
- fix: β Patch release
- feat: β Minor release
- feat!: β Major release (breaking change)$3
Any change that breaks existing usage must be marked as a breaking change.Example:
`bash
git commit -m "feat!: change CLI input format"
``MIT Β© Suraj Sutar