Thanks for the answer but that’s off already. Digging a little deeper, dragging the book onto Calibre does the following: - Copies it into Calibre’s library, removing the.kepub from the name - Creates a cover.jpg - Creates a metadata.opf The problem seems to come during the actual sync. Closest I found was a KePub Output plugin for Calibre, but it fails to work on the command-line, and won’t be fixed for a long while. Is there a tool I’m missing? Epub kobo kobo-glo. Improve this question. Follow asked Aug 29 '15 at 11:34. User137369 user137369. Ik heb al mijn boeken overgezet naar KePub formaat met Calibre (ze staan nu ook als Kobo epub in de de bibliotheek), maar er lijkt weinig te veranderen. Ik heb alleen wel de titel bovenaan de pagina nu, maar heb nog steeds geen toegang tot leesstatistieken van het betreffende boek en kan ook niet bij de geavanceerde instellingen van de weergave.

  1. Calibre Drm Removal Plugin For Windows
  2. Calibre Kepub
How to view and convert KFX files in Calibre - Tutorial

Updated: May 13, 2019

This is a rather interesting topic. Over the years, Amazon have changed the Kindle file format several times. Their digital books came in a variety of formats, including AZW, then AZW3 and finally KFX. The last one is a complex archive that combines numerous features, including typesetting engine, fonts, multi-page thumbnails, and also DRM. I noticed this starting with Decay, one of my books published in 2017.

Reading some more, I realized KFX seemed to include DRM even for books that are not meant to use DRM, and I found this quite weird, because as an author, I have specifically chosen not to publish my own works with any sort of lock-in encryption. So this got me thinking. Is there a way to actually convert KFX into the old format, or other e-book formats, and use them in Calibre and other readers, the way the older formats allowed? Follow me.

Basic tools, requirements & disclaimer

Kindle

What you want to do is simple: convert KFX files to other formats - for archiving, backup and publication testing purposes, so you can use them on different e-reader devices. If you try to open a KFX file in a typical e-book reader, you probably won't succeed. For instance, Calibre cannot read this file format natively. The solution is then to convert the file, our task for today.

I spent a good few hours reading about this topic, compiling information, trying to find out all the necessary bits and pieces to get the job done. In the end, I did successfully manage, but it wasn't trivial, and there are still many ifs and buts to the whole thing. So let's start with the tools:

  • I tested this on a Linux system (Ubuntu-based).
  • Calibre software (apt-get install calibre or dnf install calibre, for instance).
  • DeDRM Calibre plugin.
  • KFX Input Calibre plugin.
  • Your Kindle device serial number.
  • KFX book (which includes ALL the files and associated folders for the specific book on your Kindle).

You will need to feel comfortable installing Calibre plugins and working with archives. If you can't do these things easily, you will probably struggle getting the job done here.

Disclaimer

The purpose of this guide is not to teach you how to hax0r your way around. The purpose is to allow you to decrypt your own books and use them on your own devices. In fact, the DeDRM plugin listed above does not work with rented or lent books - it only works for the books you have purchased yourself.

There are also numerous technical limitations on how well the tools listed above work, including the version of Kindle software and such. In my test, I did not encounter any such problems. But please take this into consideration as you read on.

Before you start ... download non-KFX books

When you purchase a Kindle book, and then go to your Kindle library, you can choose different delivery methods. You can send books directly to a Kindle device or reader, and you can also transfer them via USB. This will effectively download the book to your local computer, which you can then copy to the relevant device. For the time being, books downloaded via USB come in the non-encrypted AZW format, but this may change. So this is your first and best options, before doing any fancy conversions! If the book is in your Kindle library, then you are all set.

Calibre plugins setup

After you install and start Calibre, you will need to install the two plugins (Calibre > Preferences > Plugins). KFX Input is available in the list of plugins, although you can also download it manually (see the linked forum thread at the beginning of the page). DeDRM is available from GitHub. Both plugins come as ZIP files. The DeDRM plugin ZIP contains more than just the plugin itself - but it also has what we need, the Calibre plugin.

To install KFX Input, click on Get new plugins, select, install, restart Calibre.

To install DeDRM, download the zip file from GitHub, extract it. Next, in Calibre, click on 'Load plugin from file' in the plugins window, navigate to the Calibre sub-folder in the extracted archive and then select the plugin zip. If you have chosen the 'wrong' zip (such as the external zip archive), you will see the It does not contain a top level __init__.py file error. Once you've installed this plugin too, restart Calibre.

DeDRM setup

Your next step is to configure the DeDRM plugin. Open the plugins list, search for DeDRM in the list. Double-click on the plugin, and it will open the customization window. You must configure the plugin, otherwise it will not work. And this is probably the most complex step. Because not everyone has a Kindle device, and this is where it gets complex. There are various technical limitations on different types of devices, like Kindle for Android or Kindle for Mac.

I selected eInk Kindle books - please note I own a Kindle device, and I connected it via USB to my Linux machine, and then copied my Decay book over ( all Decay* titled files, KFX plus folder). When you select this option in the DeDRM customization screen, you need to add a serial number for your Kindle device. It's a 16-digit string composed of numbers and digits (no spaces).

Add KFX book to Calibre

The next step is to add your KFX book to Calibre. If you have already added it to Calibre, remove it and then add it fresh. DeDRM runs on first import only. If you've configured everything correctly, DeDRM will run now. This can take a few seconds.

While this was happening, in the background, DeDRM configured WINE for Linux, probably so it could install various Windows-based tools it needs to create decryption keys. There's no need for you to do anything manually, but you should be aware of this, especially since it creates a new WINE configuration directly in your home directory, and not as a hidden object (no dot prefix), so this may pollute your home - you will suddenly see drive_c and various WINE reg files there.

And then, it was done. The book was imported. I noticed the cover image was black & white rather than color, but that's easily solvable. I opened the book in the Calibre ebook reader, to verify that I indeed the DRM component was removed.

Convert to other formats

The next step is to convert the book using KFX Input. This is an optional step, but if you want to have your book in AZW3 format, or maybe EPUB or alike, then you can use this plugin. This can be quite useful if you have multiple ebook devices, or want to keep a backup of your own files - although they should all be available in your Kindle library, but still.

I then opened the file in the Calibre ebook reader, to make sure everything is dandy:

And that's it. We're done. Happy times.

Various errors

In case things didn't work as they should, then you will see various errors, apart from the DeDRM plugin ZIP error we've already discussed. First, if you try to open a KFX file in Calibre without the use of the DeDRM plugin, you won't be able to do so. Moreover, if you try to use KFX Input before DeDRM has run, you will not be able to convert the file, even if you did select the option to ignore errors during the conversion process.

Conclusion

Hopefully, this guide was useful. I have never really needed the ability to open any KFX file in Calibre before, because I'm happy using and reading them on my Kindle. But when it comes to my own books, the books I've written myself and then published WITHOUT DRM, then I expect to actually be able to work with these files, including any pre- and post-publication processing required - after all, this allows me to test how the digital books render on different devices, and make sure that my readers get the best experience.

This isn't a trivial tutorial - it uses Linux (which may already be too much), requires two Calibre plugins, and you need some tweaking to get things working. But in the end, we did succeed. For people who can't be bothered, my advice is to grab the files from your Kindle library using the USB option, this way you won't need to worry about the KFX conversion. Alternatively, this article outlines the steps you need to get the job done. See you out there, and enjoy your books!

Cheers.

Kepub is a term used to describe the eBook format designed for Kobobooks.

[edit]Overview

The Kobo company has developed their own variation on standard ePubs. Kobo eReaders have an SQLite database that helps them read and manage books that come from their bookstore or another bookstore that has adopted their format. In some cases the books downloaded from their web store will be stored directly in this database and in other cases the books will be stored separately but will be referenced and managed from the database.

The application used to read these eBooks is call Nickel. It is the only reading application on a Kobo Device and can read ePub as well as PDF and CBZ formats. It is capable of working with Adobe DRM. It is also available as Kobo eReading Apps for a wide variety of platforms. While the application can read both kepub and ePub there are differences. For example the kepub can now be coded to meet the ePub 3 standard.

Kobobooks stores can also sell ePub books which can be read on any device that supports ePub. The user will need to ensure which formats are available for a particular book. Regular ePub support uses Adobe's RMSDK engine while Kobo ePub support uses NetFront's ACCESS engine.

Kepub

Note that a kepub formatted book needs the extension to be .kepub.epub, that is two extensions. Otherwise it will not recognize the book as different from a normal epub.

[edit]kepub folder

If you attach a Kobo reading device to your computer via USB you will find that it mounts the reader's internal memory as an external disk drive on the computer. You can examine the contents of this area and will find a .kobo folder. (If your computer runs Linux, you may need to use the 'view hidden files' option in your preferred file manager to see the folder because its name starts with a period.)

Inside the .kobo folder you will find the SQLite database and a second folder called kepub. It holds a number of files with long numbered names and no extension, each of which contains one of the books on your device. If you copy one of them to your computer and add .zip to the end of the name so you can open it, you will find that it is really an ePub file. Most of the contents are encrypted with DRM, but some files are in plain text such as the OPF file and the CSS file. Beginning with version 1.9 of Kobo's operating system, the Kepub format became the primary type of ePub on their devices.

On a PC running Windows, you will find this same information stored at Documents and SettingsYour NameLocal SettingsApplications DataKoboKobo Desktop Edition (UsersYour Name etc. on Vista and Windows 7).

[edit]SQLite database

The Kobo.sqlite database is the heart of the Kobo system. SQLite is a standard database and you can use readily available tools to look at its content. However, the actual structure is not documented and any changes could corrupt the database so are not recommended.

[edit]Kepub compared to ePub

The kepub format is compatible with ePub leading some to theorize that they could just change the extension to .kepub.epub to make a Kepub from an ePub. However there are some differences. In a kepub, each sentence is wrapped in a span. This is assigned a unique id. The location system uses these ids. If you just change the extension, when you close and reopen a book, you will always be taken to the start of the chapter you were in. And any annotations stored will not be redisplayed in the book. A conversion of ePub to kepub will add the spans to the epubs. There are also some extra divs and CSS that the kepub ereader expects which helps with the way it does the formatting. The DRM system is also different for eBooks using DRM. Kepub also supports ePub 3 formatting which is still not supported for ePub.

[edit]DRM

Calibre Drm Removal Plugin For Windows

Kepub files use a proprietary DRM scheme, sometimes called 'kdrm' due to its characteristic xml tags in the rights.xml file. While many kdrm-protected kepub ebooks are also available for download as regular epubs with ubiquitous Adobe DRM, this is not always the case, restricting the use of these ebooks to Kobo devices and reading applications. Tools to remove this DRM scheme have recently been developed.

[edit]Advantages

Calibre Kepub

Calibre Kepub

Extras features are available for eBooks being managed by the Kobo database. Some are restricted to only purchased DRM eBooks. Some are no longer applicable to latest firmware.

  • highlighting of words in the document.
  • multiple bookmarks of pages in the document.
  • dictionary lookup of a selected word in the document.
  • being able to add annotation to a highlighted word.

Comparison of Kepub and ePub with both on a Kobo device.

Positive: KePub (sideloaded):

  • Quicker to respond to page turn gestures (especially tap gesture)
  • Faster text selection (e.g. when highlighting large areas of text)
  • Support for footnote previews
  • Can double-tap to zoom images
  • Shows number of minutes of reading left until end of chapter
  • Shows title of ebook in the header (negative for some people)
  • support for ePub 3.

Positives for standard ePub on a Kobo device:

  • Better hyphenation (kepub reader can hyphenate words in the wrong place if they have trailing punctuation)
  • Full justification works properly (kepub reader doesn't properly justify some lines that contain certain common characters such as ellipsis and emdash)
  • Better support for embedded fonts
  • Full-screen mode works without fonts being cut off
  • Better word spacing when using full justification

(Apart from the last, all of these ePub advantages are due to bugs in the KePub reader.)

[edit]See also

  • https://github.com/kobolabs/epub-spec includes:
    • Elements of the ePub spec that Kobo does and does not support.
    • Features of the five Kobo reading platforms.
    • Recommendations on file production and testing for content creators.
  • https://github.com/pgaskin/kepubify - tool to convert epubs to kepubs
Retrieved from 'https://wiki.mobileread.com/w/index.php?title=Kepub&oldid=53904'