Skip to content

surajsutar7/epub-to-pdf-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

94 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ EPUB to PDF CLI – Node.js EPUB to PDF Converter using Calibre

npm npm license node

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.

EPUB to PDF CLI


This tool is ideal for:

  • Developers
  • Automation pipelines
  • Ebook processing
  • Batch EPUB to PDF conversion

✨ Features

  • 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

πŸ“¦ Installation

Global install (CLI)

npm install -g epub-to-pdf-cli

After installation, the epub2pdf command will be available globally.

Or run without installing

npx epub-to-pdf-cli book.epub

πŸ–₯ CLI Usage

epub2pdf <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.

πŸ“š Programmatic Usage

bash

npm install epub-to-pdf-cli

js

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:

bash

ebook-convert --version

Install Calibre

Ubuntu/Debian

sudo apt install calibre

macOS

brew install calibre

Windows

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.

Commit Types

  • fix: β†’ Patch release
  • feat: β†’ Minor release
  • feat!: β†’ Major release (breaking change)

Breaking Changes

Any change that breaks existing usage must be marked as a breaking change.

Example:

git commit -m "feat!: change CLI input format"

πŸ“„ License

MIT Β© Suraj Sutar

About

πŸ“˜ EPUB to PDF CLI – Node.js EPUB to PDF Converter using Calibre

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors