Thread: KFX Format
View Single Post
Old 03-06-2016, 01:29 PM   #396
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 7,118
Karma: 92500001
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by Rizla View Post
It sounds like you've had some success converting an epub to kfx. Have you made any progress converting kfx to other formats?
The Previewer (when it works) has allowed me to compare EPUBs with the resulting equivalent KDFs. I have also been able to use these results to see how different KDF data types appear in the Previewer's book renderer. That, combined with a few instances of unencrypted KFX files obtained from Amazon, has allowed me to have a pretty good idea of how KFX works, at least for reflowable e-books.

I have written some code to convert KDF/KFX back into EPUB in order to test my assumptions. That isn't anywhere near usable as a general function, just a proof of concept. I posted an example result earlier.

I don't see conversion of KFX to EPUB as being a very useful capability. First Amazon encrypts KFX books, even those that are available DRM-free in KF8. The only books that could be converted from KFX to EPUB are those you converted from EPUB to KFX in the first place. Even if decryption eventually becomes possible, KFX is far inferior to KF8 as a source for archival or conversion. The original EPUB internal HTML semantic markup is lost in the conversion of EPUB to KFX.

For example, in KFX conversion <p>, <div>, <h1>, and <blockquote> all produce the same 'text' data type with any differences reflected in the formatting style. The same goes for <b>, <em>, <i>, <small>, <span>, <strike>, <strong>, <sub>, <sup>, etc., which all become just the equivalent css styles applied to text. There is no way to tell from the result whether the original EPUB used these different tags or just used css for formatting. Also values expressed in px or pt units tend to be converted to roughly equivalent em units in KFX.

Last edited by jhowell; 03-06-2016 at 02:39 PM.
jhowell is offline   Reply With Quote