epub-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
npm install -g epub-to-pdf-cliAfter installation, the epub2pdf command will be available globally.
npx epub-to-pdf-cli book.epubepub2pdf <input.epub> [output.pdf]
Examples
epub2pdf mybook.epub
epub2pdf mybook.epub mybook.pdf
This converts an EPUB ebook file into a PDF document using Calibre.
npm install epub-to-pdf-cliimport { 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.
This package requires Calibre to be installed.
Verify installation:
ebook-convert --version
sudo apt install calibrebrew install calibreDownload from: https://calibre-ebook.com/download| 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 |
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.
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
This project follows Semantic Versioning using Conventional Commits.
fix:β Patch releasefeat:β Minor releasefeat!:β Major release (breaking change)
Any change that breaks existing usage must be marked as a breaking change.
Example:
git commit -m "feat!: change CLI input format"MIT Β© Suraj Sutar
