How to Use Calibre to Convert EPUBs into Decent PDFs

epub to pdf

I'm not exactly the voracious reader but nonetheless I make the point of reading small bits of a book every day when I can. I almost exclusively read all my books from my computer since the bulk of them are internet sourced. That means I encounter different kinds of eBook formats, but usually it tends to be either PDF or EPUB. I prefer the former thanks to its flexibility and software support. With flexibility I mean it allows me to highlight, add notes and do a whole lot of other stuff that I can't simply accomplish with the EPUB format.

So the other day I found myself in a situation where I wanted to start a book but it was in EPUB format. I tried using a couple of eBook readers (SumatraPDF, FBReader & Ice Cream Reader) before realizing it was just impossible for me to read without making some notes. As a result, I began my search for ways to convert the EPUB in question to PDF and that's when I realized I had Calibre Portable from years back that could convert various EBook formats.



While getting Calibre to convert an EPUB or for that matter any EBook format to PDF works like a charm, getting it to output a PDF the way you want it can be quite a chore for the inexperienced as I came to find out. In my case the margins came out wrongly, actually they were almost non-existent, not to mention the font was too large. I played around with the settings with little success to the point of actually converting the EPUB to RTF (Rich Text) and hoping Microsoft Word would do a better job. I was terribly wrong (calibre messed up the encoding of some characters). One day later and a couple of hours down, I figured out why Calibre was overriding my output settings and finally managed to get a decent PDF output. Thought I should share this to anyone that may find themselves in a similar situation. (Update: problem turned out I was using an outdated Calibre.)


STEPS

1. If you haven't yet installed Calibre, you can get it from the official download page here. It cross-platform (Windows, Linux & MacOS) plus there's a portable if you prefer to carry it around in a portable storage.

2. Launch Calibre and add your EPUB from the Add Books icon in the toolbar. Calibre will copy the EPUB into the default library location (the one you set when installing; you can change it clicking on the Books icon in the toolbar) and then add it in the library.

3. From the library, right click the EPUB in question and select Convert books then Convert individually.
convert
Convert Individually

If you're converting many EPUBs in bulk, select all of them (Ctrl + A), right-click and select Convert books then Bulk convert.

4. Doing that will launch the Convert window where we need to specify the desired output settings.
conversion window
Convert Window

i. So first, on your top right select the Output format (PDF) from the drop down list.

ii. If you need to change any metadata (title, author etc.) do it in this page. You can also change (or add if it's not available) the cover which is what will be used for the first page of the PDF.

iii. Next, switch to the PDF Output page. At the top you'll notice there's a notice indicating the setting there will only take effect "if you've set the output profile to the default output profile". That's what I had ignored in my case.

So before changing anything here, first decide where it is you intend going to read the PDF from. If it's from an EBook Reader/Portable Device (Kindle, IPad, tablet etc.) then it's probably wise that you choose a device specific profile so that everything, from page sizes to margins, is taken care of for you. This way the PDF will look good on your device and you won't have to resort to zooming to fit the PDF on the display.

To do that, go to the Page Setup page and in the output profile select your Device's Profile.
profiles
Output Profiles
Then go back to the PDF Output page and tick the option Use the paper size set in output profile.
output
Output to Profile
On the other hand, if you intend to view the PDF on a desktop or any other large display, you can leave the paper size at Letter or set it to A4. You can also choose to pick one of the other predefined profiles or even set a custom size in millimetres (mm) [e.g. 209.9x297].
customize pdf
Customize PDF Output

You can also change the paper margins though the default (72.0 pts) looks good with the letter size. Similarly, if you wish to change the font into something else you can do it from here.

If you want to add Footers and Headers you can do that also from here. I haven’t used this feature yet but I suggest you read the Documentation link provided there to figure out how to use. It however does provide some predefined templates (_PAGENUM_, _TITLE_, _AUTHOR_ and _SECTION_) which should cater for most people's needs.
header footer
Header & Footer Options

v. At this point you'll want to output it first to see how it looks before making any more adjustments. To do that click the OK button and wait for the job to finish. When it's done check the output in the library location or right-click the EPUB and choose Open containing folder. You should find the PDF there. 
view pdf
View Output PDF

5. If you're not happy with the results you can adjust some more settings:

i. First, you may want to add or adjust the spacing between the paragraphs which I find makes the PDF look nicer and more readable. To do that, go to the Look & Feel page then Layout tab and add a tick on Insert blank line between paragraphs. You can also customize the size of the space though the default 0.5em should be enough.
line space
Adding Line Space

ii. In the Text tab you can also adjust the justification of the text (left, justify), smarten the punctuations (i.e. convert them to their fancy look e.g. " " to “ ”), unsmarten (does the opposite e.g. “ ” to " ") and Transliterate Unicode characters to ASCII (i.e. if it has none-ascii characters in Russian, Japanese, Chinese etc.).
text
Text Options

iii. You can also enable heuristic processing in the Heuristic Processing page which basically tries to fix some common errors it may find in an eBook rather than you doing it by yourself. The results however vary and in some cases it may actually worsen the output. Try using it if your conversion turns out badly but you don't have the time to tweak the individual settings.



iv. By default Calibre will create bookmarks for your PDF even if the EPUB doesn't have. If you need to adjust the Bookmark settings, go to Table of Contents page. For instance, if you don't want it to use the bookmarks in the EPUB (which could be wrong, incomplete) tick the option Force use of auto-generated Table of Contents so that it creates a new one for you.
toc
Customizing Table of Contents


I hope with this you can now finally convert your EPUBs into some decent PDFs. All thanks to Kovid Goyal the developer of Calibre for creating and giving away for free such an incredibly useful software.


Related Posts



Loading comments…