kfxgen is a Calibre plugin that turns EPUB books into Amazon's KFX format, with a working Kindle table of contents.
What's new in 5.20.0
Ten fixes since 5.19.0, each one compared with Kindle Previewer 4.0.3, Amazon's own converter, on the same book.
Pictures
- A large PNG picture is saved as a JPEG when that is smaller, as Amazon does. In a 12-book library sample, those pictures shrank from 36.4 MB to 11.5 MB. Pictures with transparency stay PNG.
- A picture inside a table cell's words stays in the line.
- A picture on its own line inside a paragraph sits where Amazon puts it: with the text after a single line break, as its own block after a blank line.
- A link aimed at such a picture lands on it.
Tables
- Header cells are centred unless the book sets their alignment, and a header the book sets to normal weight is no longer bold.
- Plain cells are no longer forced to the left. They follow the reader's default, as in Amazon's books; checked on a Kindle Paperwhite.
Navigation
- When kfxgen rebuilds a Contents page, the page's own section headings (such as "Part One") are kept, in place.
- Heading stops follow the order in which each heading level first appears.
Tech debt paid down
- Some earlier table fixes were measured against Amazon output made from test pages without a document type. Amazon's converter reads those in an older compatibility mode that aligns tables differently.
- Those rules were re-checked the way real books are read, and corrected. The test pages are fixed too. One right-to-left rule is filed for the same correction (#605).
Still open:
- Right-to-left tables (#605) and pages (#246).
- Vertical Japanese text (#247).
- A few smaller differences, listed in the changelog.
The full list, with issue numbers, is in CHANGELOG.md.
Install (Calibre)
- Download kfxgen-plugin-5.20.0.zip from the Assets below.
- In Calibre, open Preferences → Plugins → Load plugin from file, and choose the zip.
- Restart Calibre.
Or from the command line:
calibre-customize -a kfxgen-plugin-5.20.0.zip
Then convert any book to KFX.