View Single Post
Old 01-31-2019, 09:11 AM   #165
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,117
Karma: 92190133
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
Quote:
Originally Posted by BaconWaifu View Post
I'm getting a FormatError from yj_to_epub_content when trying to convert a (admittedly, absolutely huge) KFX file with calibre. The book is in the "Print Replica" format.
Thanks for the error report. There is definitely KFX content in that book that I have never seen before. That particular book is too expensive for me to purchase in order to try to work it out. I will have to wait until I run across that problem in some other book or someone reports it in an inexpensive book or one with a free sample available.

But there is no need for you to wait for that:

Quote:
Originally Posted by BaconWaifu View Post
WARNING: This book contains PDF resources. They will be rendered as JPEG images during conversion.
WARNING: The original resources can be extracted using the KFX Input command line interface.
Since that book is print replica, using the calibre GUI to do the conversion will only result in a book composed of a series of page images.

The KFX file actually contains one or more PDF files within it. I recommend using the command line interface of this plugin in order to extract those. That should bypass the conversion code that is failing for this book and also give you something more usable as a result.

If you save the KFX file from your calibre library to "yourfile.kfx" the command to extract the internal resources would be:

calibre-debug -r "KFX Input" -- -u yourfile.kfx yourfile.zip

You would then open "yourfile.zip" and extract the PDF files.

As another alternative, if you can find a way to obtain this book as a AZW4 file instead of KFX you would get even better results by extracting the PDF from that using the kindleunpack plugin.

-------

Update: I was able to locate a free sample book that has the same problem. The conversion errors will be fixed in the next plugin release.

Last edited by jhowell; 01-31-2019 at 12:48 PM. Reason: Update
jhowell is offline   Reply With Quote