eBooks

How to Convert Epub to PDF in Ubuntu Linux

EPUB is a popular file format supported by e-book readers on Amazon Kindle, Mobiles, Tablets and other devices. But sometimes you may need to convert Epub to PDF file to be able to view the documents using Adobe Acrobat Reader. There are many Epub to PDF converters that allow you to easily convert Epub files to PDF files.

If you want to batch convert many Epub documents to PDF, it is advisable to use a package so you can run it via command line. In this article, we will learn how to convert Epub to PDF using Calibre command line software.

Calibre – is a free and probably most used ebook reader and converter out there as it supports Windows and Linux platform. Calibre is a powerful and easy to use e-book manager. Users say it’s outstanding and a must-have. It will allow you to do nearly everything and it takes things a step beyond normal e-book software.

1. Install Calibre
Installation is very simple on Ubuntu

$ sudo apt update
$ sudo apt install calibre

2. Convert Epub to PDF File

Onc ethe Calibre ins installed you can run this command line and convert individually ePub book into PDF

cd /Ebooks
# ebook-convert <file>.epub <file>.pdf
ebook-convert test.epub test.pdf

In case the new PDF file is not properly readeable re-use teh command with this option

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

Calibre software is also available as GUI. So if you do not like command line , you can open Calibre GUI and convert the books from ePub to PDF/mobi or awz format very easy. However if you have bunch of ePubs and you wnat to process them all you can use this simple shell script.

#!/bin/bash
for filename in /home/Ebooks/*.epub; do
        ebook-convert $(basename "$filename" .epub) "$(basename "$filename" .pdf)"

done

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.