Convert-ing ebook epub to PDF ( or any other format)

// = Convert-ing ebook epub to PDF ( or any other format) :id: 024031e5-6676-4513-8b51-ef5a98d36ea2 :author: Andrei Clinciu :website: https://andreiclinciu.net/ :publish_at: 2013-05-23 21:14:00Z :heading_image: \N :description: \N :type: article :tags: :keywords: :toc: left :imagesdir: ../assets/

image::{heading_image}[] Sometimes you might want to convert ebooks from one format to the other.

Either because your ebook works better with a format or you want to print them to a certain size with margins.. etc.  For example Nook has epub support for searching words in dictionary, while PDF doesn’t work well.. sometimes I might convert a book to get the extra features.

You can install Calibre which supports a variety of formats and options:

  • DejaVu .djvu
  • Comic Book Archives .cbr, .cbz, .cb7, .cbt, .cba
  • Mobi .mobi
  • Amazon Kindle .azw
  • And others including Epub, pdf.. etc

[source,lang:sh,decode:true]

sudo apt-get install calibre

 

For example to have an even margin and make it pretty with a A4 size, use the following command. You can wrap a for loop around it and make it convert all your ebooks!

[source,lang:sh,decode:true]

ebook-convert YourBook.epub “YourOutputBook.pdf” –pdf-page-numbers –paper-size a4 –pretty-print –margin-left 72 –margin-right 72 –margin-top 72 –margin-bottom 72

 

Subscribe to my Newsletter

Receive emails about Linux, Programming, Automation, Life tips & Tricks and information about projects I'm working on