Day: June 26, 2024

How to Strip DRM from Kobo Purchases

Expanded from a post at brontoforum.us, 2024-05-28.

I like the Humble Bundle. I've bought rather a lot of games, comics, and books there.

Usually the comics and books have been DRM-free, but recently they've had a couple of bundles, including a Discworld bundle and a TMNT bundle (still available as of this post), that, instead of being straight DRM-free file downloads, required that buyers redeem DRM-encumbered files from Kobo.

Fortunately, it's not difficult to strip DRM from Kobo downloads, so that you can read your books on whatever device and in whatever app you choose. Here's how:

Download and install Calibre.

Download DeDRM tools (make sure you get it from the noDRM repository, not the original apprenticeharper one; the latter is no longer maintained).

Extract the zip file.

In Calibre, go to Preferences → Advanced → Plugins. Click "Load plugin from file", browse to the directory you just unzipped into, and install both _plugin.zip files. Restart Calibre after both are installed.

Install Kobo Desktop (direct link to kobosetup.exe). Run it, log into your Kobo account, and download the books you want. Once they're finished downloading, quit out of the Kobo app.

In Calibre, click the "Obok DeDRM" link in the top bar. From there it's pretty self-explanatory; whatever books you select will be added to your Calibre library and you can find the epub files in your file browser.

That's it for stripping the DRM, but there's one more thing I noticed: it turns out that my comics reader app of choice, Perfect Viewer, doesn't really work very well with epub files; for some reason it doesn't support the same features for epub as it does for cbz/cbr/pdf files (eg automatically showing two pages when rotated). Fortunately, there's a dead-simple workaround: change the file extension from .epub to .cbz. (A CBZ is just a zip file of images; an EPUB is basically a zipped website. Change the extension from EPUB to CBZ and PerfectViewer just ignores the HTML files and looks for the images.) YMMV depending on your reader of choice; some will show side-by-side pages without issue (like Calibre's built-in reader) and the file extension trick may not work in others (since the images aren't at the root of the zip file; in that case you may need to extract the EPUB and then re-zip just the images into a CBZ file).