DEV Community

Suraj Sutar
Suraj Sutar

Posted on

How to Convert EPUB to PDF Using Node.js (Free & Open Source)

πŸ“˜ Convert EPUB to PDF using Node.js (Calibre Powered)

If you are looking for a free and reliable way to convert EPUB to PDF, this open-source tool can help.

epub-to-pdf-cli is a Node.js command-line utility that converts EPUB files to PDF using Calibre β€” without uploading files to any online service.


✨ Why Not Use Online EPUB to PDF Converters?

Most online converters:

  • Upload your files to servers
  • Have size limits
  • Reduce quality
  • Are not automation-friendly

This tool works offline, keeps your files private, and integrates easily with scripts.


πŸš€ Features

  • Convert EPUB to PDF using Calibre
  • Works on Windows, macOS, Linux
  • CLI + programmatic API
  • Lightweight & fast
  • No bundled binaries

πŸ“¦ Installation

npm install -g epub-to-pdf-cli
Enter fullscreen mode Exit fullscreen mode

Or run instantly:

npx epub-to-pdf-cli book.epub

πŸ–₯ CLI Usage

epub2pdf mybook.epub mybook.pdf
Enter fullscreen mode Exit fullscreen mode

πŸ“š Programmatic Usage

import { convertEpubToPdf } from 'epub-to-pdf-cli';

await convertEpubToPdf('book.epub', 'book.pdf');

Enter fullscreen mode Exit fullscreen mode

βš™ Requirements

This tool uses Calibre.

Check installation:

ebook-convert --version
Enter fullscreen mode Exit fullscreen mode

Install Calibre:

πŸ”— Project Links

πŸ“¦ npm package:
https://www.npmjs.com/package/epub-to-pdf-cli

πŸ’» GitHub repository:
https://github.com/surajsutar7/epub-to-pdf-cli

🌐 Documentation site:
https://surajsutar7.github.io/epub-to-pdf-cli/

🧠 Who Is This For?

  • Developers
  • Ebook automation pipelines
  • CI/CD workflows
  • Anyone needing EPUB to PDF conversion

⭐ Support the Project

If you find this useful:

  • ⭐ Star the repo
  • πŸ“¦ Download on npm
  • πŸ§‘β€πŸ’» Contribute on GitHub

MIT Licensed @ Suraj Sutar

Top comments (0)