Are you looking for a way to convert an EPUB format file to a PDF file on the Linux command line interface?. EPUB is an e-book file format that uses the “.epub” file extension. Even though the ePub format is supported by most E-Readers installable on Windows, Smartphones, Tablets, e.t.c., you could still have a need to convert EPUB to PDF format which is commonly used.

The conversion process of PDF has become very easy, and you can find many Convert PDF to word tools. These tools are very useful, efficient, and reliable to use. Such tools instantly perform the conversion process within seconds.

In this guide, I’ll show you the easiest and safest way of converting ePub files to PDF. This is possible with the help of Calibre. This software is not pre-installed on most Linux distributions but it can be easily installed using the OS package manager.

Install Calibre on Debian / Ubuntu

For Ubuntu / Debian family of Linux, install Calibre by running the command below:

sudo apt-get -y install calibre

Installation of Calibre provides ebook-convert command which we’ll use for the actual conversion.

$ which ebook-convert

Install Calibre on Arch Linux / Manjaro

The Calibre package is available on Arch Linux upstream repository. Install it by running:

sudo pacman -S calibre

Install Calibre on CentOS / Fedora

Calibre has a binary install that includes private versions of all its dependencies. Execute command below in your terminal to install Calibre on CentOS / Fedora.

sudo -v && wget -nv -O- | sudo sh /dev/stdin

This requires wget. If not installed, first install it:

# CentOS 
sudo yum -y install wget

# Fedora
sudo dnf -y install wget

How to Convert ePub file to PDF Format on Linux CLI

Now that you have installed Calibre, you can start the conversion process. Change your current working directory to folder container EPUB file.

$ cd ~/ebooks

The convert the ePub file to PDF using the command:

ebook-convert <file>.epub <file>.pdf

See example below:

$ ebook-convert myfile.epub myfile.pdf

Confirm file type.

$ file myfile.pdf
myfile.pdf: PDF document, version 1.4

Try to open your PDF and see if readable. If the output is not appealing, then try:

ebook-convert myfile.epub myfile.pdf --enable-heuristics 

You can also do the conversion from the Calibre GUI.

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here