You are on page 1of 21

Converting Kindle Books to PDF

Overview
This document shows the steps I'm using to export books from my Kindle (books that I bought through Amazon) to PDF format. Why am I doing this? Well, for technical manuals anyway, I prefer PDF format because they're easier for me to annotate and the page layout is usually more friendly to screenshots and code samples. And also, I want to be able to search my tech library from my computer, and Kindle books aren't searchable from outside Kindle. I want Mac Spotlight (and all applications that use Spotlight, like Alfred, DevonThink, Tembo, HoudahSpot, etc.) to be able to index and examine the contents of my tech books. I want to be able to search once and find results in any and all of my web archives, notes, Curio documents and tech books. If I bought the books through a DRM-free seller like O'Reilly, I already have PDF files. If I bought books through the Apple bookstore, I think I'm hosed (their DRM is very difficult to strip out) ... so I don't. But I buy a lot of tech books through Amazon, so this is how to work with them (for entirely legal purposes, thank you). All of this uses software that I found as of September 2012, which means (a) this is the stuff I found, not necessarily all the stuff that's out there; and (b) everything could change tomorrow. Aint technology grand.

Converting Kindle Books to PDF

Page 1

Start in Kindle for Mac: the book in question must be stored locally.

Here's a snapshot of my Kindle for Mac home screen. (Yes, I have a lot of copies of Emily Goes Overboard ... there's a whole story there, for another time.) In the picture I've highlighted some of my tech books.

Converting Kindle Books to PDF

Page 2

If necessary, retrieve the book from the Kindle account archive.

1. If the book in question hasn't been downloaded to the computer yet (maybe it's only on the iPad), you'll need to go get it. In Kindle for Mac, click the Archived Items button. This shows everything that's been purchased but isn't stored locally. 2. Find the book you want, right-click on it and choose Add to Home. This will download the book (if it's a big book, it might take a little while).

Converting Kindle Books to PDF

Page 3

Find the local file for the book ... it'll be in Documents > My Kindle Content

Here's where Kindle for Mac stores your books. The file you want is going to be an AZW file. Unfortunately, many (though not all) Kindle file names are darned cryptic. How can you tell which book is which? Trial and error is one way ... just keep processing books using the steps that follow until you get the right one. Maybe there's a better way, but I haven't found it yet.

Converting Kindle Books to PDF

Page 4

For newly downloaded books...

If you just downloaded the book in question from the archive, or maybe you just purchased it, it'll be the most recently added item in the folder. So one trick is to tell the Finder to arrange the contents of the folder by Date Added. That's what I'm doing here, since I just downloaded this book. The item at the top of the list is probably the book I want.

Converting Kindle Books to PDF

Page 5

Use a DRM-stripping utility ... I'm using DeDRM from Apprentice Alf.

I found this online and it works swell. Here's where I got it: http://apprenticealf.wordpress.com/2010/11/18/dedrm-applescript-for-mac-os-x-10-5-10-6/ I downloaded a zip archive that extracts to this tools_v5.1 folder. (And okay, this is embarrassing, I never investigated that Calibre_Plugins folder there ... so my steps recorded here don't make use of that. Setting the plugins up looks a bit daunting to me, so for now I'm fine without using them.) The main tool I use from here is a Python droplet that you'll find in the DeDRM_Applcations folder. Following the instructions in the ReadMe, I copied the droplet to my Applications folder and put it in the dock.

Drag the AZW file from My Kindle Content onto the droplet.

The droplet doesn't have to be in the dock for this, of course ... it's a droplet, no matter where it's stored. But that's how I'm doing it.

Converting Kindle Books to PDF

Page 6

After a moment, if all goes well...

This success message should appear. Just click Thanks to make it go away.

Converting Kindle Books to PDF

Page 7

PS Configuring the droplet

If you want to see details and/or configure the droplet, double-click on it to open it. This is the window that appears. You can select an ebook using the button here (instead of dropping it). You can set the configuration with the Configure button. Configuration includes a lot of settings relating to identifiers for Kindle, iPad, Nook, etc. and also a setting for where the de-drm file will be saved. The default is to save it in the same directory as the original. I've changed mine to save to the desktop. Note: If you click the Configure button, you get asked for serial numbers and such and there's no obvious way out of the dialog window. Just keep clicking "None" as it asks you about one type of identification number after another, and finally you'll get to the screen that lets you set the destination folder for your drm-free books.

Converting Kindle Books to PDF

Page 8

Find the non-drm book file.

Here's what my book file looks like. The title has been expanded to something more useful than a bunch of cryptic junk, and also it has _nodrm appended to its end. It's still a MOBI file, though. (At this point, I can tell for absolutely certain that I chose the correct book to work with -- this is the tech book I need to convert to PDF.)

Converting Kindle Books to PDF

Page 9

Launch Calibre.

Here's the Calibre main window. (And yes, it's ugly ... oh well.) 1. At the center of the window is the Calibre library, which is all of the ebooks that you've imported into Calibre already. Note that Calibre stores copies of its books in its own library folder, rather than just trying to auto-detect what's on your system. 2. The right pane of the window shows details about whatever book is selected in the list, or if none is selected the first book in the list. 3. The buttons across the top of the screen are how we'll do things. (We'll only be using Add books and Convert books.)

Converting Kindle Books to PDF

Page 10

Press the Add book button to add the new non-drm MOBI book.

Pressing the button will open a dialog box to locate your book. Locate it, choose it, and continue.

Here's the Calibre library with my drm-free MOBI added.

Select the new book.

Converting Kindle Books to PDF

Page 11

Press the Convert books button.

The convert window opens ... it's a big window with lots to do.

First, make sure that the input format is MOBI and the output format is PDF (2). You'll need to be in the Metadata section (1) to do this. You'll see when you're choosing your output format how many possible formats Calibre gives you. Note: I'm skipping past all sorts of options and information that (a) isn't needed for what I'm doing right here, or (b) I haven't tried out.

Converting Kindle Books to PDF

Page 12

Adjust settings in the Look & Feel section.

Here's the look and feel section. Clearly there's a lot you can do here (including custom CSS!), but I've only tried a few things. 1. When I selected Disable font size rescaling, I created a mess ... so don't. It's deselected by default; just leave it that way. 2. For readability under possibly sub-optimal conditions, a little extra leading can be a great help. The default here is 120%. I like pushing it up to 130%. 3. Another aid to readability is setting text to Left align. Especially with my tech books, code-heavy text is all but unreadable if the alignment gets goofed up or is badly justified.

Adjust the page setup output profile.

I don't know why, but choosing the PDF output format doesn't automatically set this profile. As the description here shows, the Default Output Profile creates a really nice, readable letter-sized PDF document, good for reading on a computer.

Converting Kindle Books to PDF

Page 13

Also in the Page Setup section, set the input profile and margins.

1. I don't really know if setting the input profile to Kindle is necessary, but I figure it can't hurt. 2. The default margins are 5 points wide, which is almost like no margin at all. I like at least 30 points here.

Finally, adjust the PDF Output settings.

As the description suggests, this section will be different if you're choosing other than PDF to export to.

Converting Kindle Books to PDF

Page 14

My favorite PDF settings.

Everything here is at the default except as noted. 1. Default font is serif, which isn't as readable on a computer screen and which I generally don't like for tech books. So I change the font type to sans (Helvetica). 2. Default font size is something godawfully large (20 pixels), which guarantees that the page won't be very readable. I like 11 pixels because it fits a decent amount of text on each line, so weird line breaks don't happen nearly so often. If the text isn't large enough for me, I'm going to be on a computer screen when I'm reading it so I can always zoom in. I also like to set the monospace font size to be the same as the default font size -- it avoids weird things happening with leading.

Ready? Click OK.

The OK button can get lost in all the clutter, but it's right there at the lower right corner.

Converting Kindle Books to PDF

Page 15

Watch the Jobs indicator ... converting can take a while.

It can take several minutes to convert a big book. Pretty much the only clue you get from the Calibre interface as to what's happening is the little spinning activity indicator and the job counter. If you're processing one book, it'll say 1. When the book is finished, it'll say 0. (This is all in the lower right corner of the main Calibre window.)

You'll also get a Growl notification.

Calibre sends out Growl notifications, so if you have Growl you'll see them. This is the notification I get when the conversion process starts.

When the job counter reaches 0, you're done!

Jobs: 0 means the conversion is done. (You may also get a Growl notification.) Note that the activity indicator doesn't go away (it just stops spinning).

Converting Kindle Books to PDF

Page 16

Examine the Calibre library to find your new book.

This one took me a while to figure out ... it doesn't exactly jump right out at you. When the conversion process is done, no new book appears in the library list. But the book that you converted is now in the library in its new format. So if you select that book and examine the book information pane (on the right-hand side of the window), you'll see multiple formats listed.

Converting Kindle Books to PDF

Page 17

Click the PDF link.

As the blue color indicates, each of these format acronyms is a link. Click the PDF link to view that format.

Converting Kindle Books to PDF

Page 18

Check out your PDF in the Calibre PDF viewer.

Here's a page from my newly converted tech book. The margins are a decent size, the font is uniformly sized in a nice, easy-to-read Helvetica, left-aligned for maximum readability. Note: If you don't like the result you get, you can always do it again. Just close the PDF viewer window, click the Convert books button again, and go through the options for export, experimenting with some different choices. Calibre will overwrite the old PDF with the new one it generates.

Converting Kindle Books to PDF

Page 19

Find the new PDF file on your computer.

Calibre stores its files in Home > Calibre Library. To find the PDF file you just made, you can browse there in the Finder. Or you can ask Calibre to browse there fore you. Just click the Path: Click to open link.

The Calibre library showing my new book

Here's my new PDF. You can open this PDF in Preview or Acrobat or any program you prefer. You can copy it into DevonThink or just make sure DT indexes the Calibre Library folder if you want to search the book from there. If you're using Spotlight-based searches, the PDF will be indexed and searched automatically.

Converting Kindle Books to PDF

Page 20

Searching the contents...

Here I've performed a search (using Tembo, a Spotlight front-end) for the phrase preventing memory leaks -- something I might want to look up if I'm stuck on a programming problem. From the results shown, we can see that (1) my new PDF contains that phrase. Also another tech book I PDF-ized, the iOS 5 Developer's Cookbook, also contains the phrase. A tech book I bought from O'Reilly that came in drm-free PDF format, iPhone App Development the Missing Manual, also got results (2). Note that the results for Documents (which is where MOBI files would appear, were they searchable) doesn't include any of my MOBI or AZW files. Note: The reference under Documents to the iOS 5 Developer's Cookbook (3) is actually pointing to RTF and HTML exports I tried from my MOBI file, using the tools I got from Apprentice Alf -those two exports aren't very attractive or readable, though as you can see, they are searchable.

Converting Kindle Books to PDF

Page 21

You might also like