Thread: KFX Format
View Single Post
Old 02-16-2016, 03:37 PM   #343
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,121
Karma: 92500001
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by KevinH View Post
Does the generated have any drmion atached to it or is it DRM free? If DRM free, what chances do you think someone might have to convert this reflowable pdf-like beast back to pure html and css?
There is no sign of DRM or encryption in the kdf files produced by the previewer.

In kfx format some information, such as metadata, is in an unencrypted container and the format of that data matches the format of the metadata found in a kdf file.

In kfx all of the actual text and document layout is in an encrypted container. In kdf that data is all in the clear and is encoded in the same binary format as the metadata. (The encrypted kfx container almost certainly holds the same data format, once decrypted.)

The data format is a representation of a nested data structure, sort of a binary version of json. I previously worked out some of the details and it is discussed earlier in this thread and there is even some code that partially handles it already in calibre. (See the PackedIon class.)

I think it is quite doable to turn kfx/kdf back into html, but it would take some work to figure out how their document model maps back to standard html. It should be possible to do this preserving visible content and formatting, but some details, such as the exact css classes used in the original document will be lost. Of course the drm used for kfx books would still be an issue.

Last edited by jhowell; 02-16-2016 at 09:15 PM.
jhowell is offline   Reply With Quote