Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-26-2016, 01:42 PM   #1
jhowell
Guru
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: 936
Karma: 7832731
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
[Conversion Output Plugin] KFX Output

KFX Conversion Output Plugin

The purpose of the KFX Conversion Output plugin is to convert e-books into KFX files that can be sideloaded to newer Kindle apps and devices. This allows books obtained from sources other than Amazon to be read with Enhanced Typesetting and multi-thumbnail Page Flip.

(Note: If you desire somewhat better typography when reading Kindle books then the Hyphenate This! plugin should be considered as an alternative to using KFX. It is less difficult to use and the book format it works with is compatible with more devices and software.)


Background:

Amazon has added support for Enhanced Typesetting and Page Flip to their Kindle devices and apps. Enhanced Typesetting allows improved rendering of e-book content using hyphenation, kerning and ligatures. Page Flip provides improved navigation within a book's contents. Only e-books in the proprietary KFX format support Enhanced Typesetting and Page Flip, and currently only Amazon sourced e-books downloaded directly from Amazon to devices are available in this format. Amazon does not provide a way for Kindle users to convert their own books to KFX format.

Amazon Kindle Previewer 3 is software that takes books in EPUB format and renders them with Enhanced Typesetting. It does this by converting the EPUB file to KDF format, which has the same content as KFX but in a different container. This plugin is able to invoke the Previewer and reformat its output to produce KFX files suitable for sideloading.

The plugin performs the following steps during conversion:
  • Convert from the original e-book format to EPUB.
  • Correct some common EPUB content issues that cause problems for the Previewer.
  • Use the Amazon Kindle Previewer to convert from EPUB to KDF.
  • Repackage the KDF data into a KFX container.

KFX books delivered by Amazon are a bundle of files composed of an encrypted main container, a metadata container, auxiliary containers (zero or more) and a DRM voucher. The plugin instead generates an equivalent unencrypted monolithic KFX file, which is supported by Amazon reading apps and devices when sideloaded.

A more in-depth discussion of the KFX format can be found in this thread.


Installation:

The Amazon Kindle Previewer 3 must be installed under the same user account as is being used to run calibre. It is available from http://www.amazon.com/gp/feature.html/?docId=1003018611 for Windows and Mac. Version 3.6 beta (Nov 22, 2016) is recommended for best results. (Versions below 3.0 beta are not compatible with this plugin. Versions newer than 3.6 beta have not been tested and might not be compatible.)

Install the plugin and restart calibre as described in the Introduction to plugins thread.

You can tell if the plugin/Previewer combination is functioning properly by attempting to convert a book that is known to work. One example is this edition of Frankenstein by Mary Shelley.


Usage:

The plugin is activated by selecting KFX as the output format when converting books in calibre. The Conversion Output Options tab for KFX output is the same as for EPUB output. (An alternative command line interface is available for advanced users. See below.)

If the calibre book being converted has a 10-character amazon, asin or mobi-asin identifier that starts with B then this will be used as the ASIN of the KFX file created. Otherwise the book will be marked as a "personal document" and a unique ASIN will be generated.

Page numbers contained in an NCX pageList or page-map.xml within the source EPUB will be converted. (Page numbers will only appear in the converted KFX file if they are present in the source EPUB. "Fake" page numbers will not be produced. EPUB 3 page-list and Amazon APNX are not supported as page number sources.)

The resulting KFX file can be viewed using Kindle Previewer 3. However, the Previewer supports the file extension .azw8 for opening KFX files instead of .kfx. "Open KFX with Kindle Previewer 3.bat" can be installed in Windows to allow files created by this plugin with a .kfx extension to be viewed more easily. See this post for details.

KFX files created by the plugin must be manually sideloaded (transferred into the target device's storage). The procedure for doing this varies by device type:
Showing Cover Thumbnail Images on E-Ink Kindle Devices:
Spoiler:

Kindle apps will show sideloaded KFX book covers in the thumbnail view, but e-ink Kindle devices will only show a generic thumbnail. This can be corrected either by adding the thumbnail image to the device or by setting an ASIN corresponding to an equivalent book sold by Amazon before converting the book.

The ExtractCoverThumbs program can extract cover images from e-books files on e-ink Kindle devices and create and load the proper thumbnails. Support for KFX was added in version 1.0.0. Running this program after sideloading KFX books is the recommended method for providing cover thumbnails on e-ink Kindles. (For more information: Download latest release, Instructions and source code, MobileRead thread)

Starting with kindle firmware version 5.8.5 cover thumbnails are no longer supported for personal documents, even if sideloaded using ExtractCoverThumbs. To work around this problem, the "kfx_output_force_cde_type_ebok" plugin tweak will cause converted books to no longer be marked as personal documents. The tweak is set in calibre by adding a new line within Preferences->Advanced->Tweaks->Plugin Tweaks as follows:
Code:
kfx_output_force_cde_type_ebok = True
This tweak setting is not recommend unless ExtractCoverThumbs is to be used because it may cause other unexpected behavior in Kindle reading apps.

As an alternative to ExtractCoverThumbs, if the proper ASIN is set before conversion then the e-ink Kindle device will automatically download the corresponding cover thumbnail image from Amazon's servers when the book is sideloaded. In order to do this:
  • Search amazon.com with a web browser for an Amazon Kindle book equivalent to the book you are converting and bring up its page. The Amazon web page must be for a Kindle-edition, a print edition will not work. If there is no equivalent book this procedure will not work. (If your Kindle is registered with an account at a country-specific Amazon site, such as amazon.co.uk, then you must use ASINs from the same site. Each Amazon web site uses its own ASINs.)
  • The web browser address bar will have something like "https://www.amazon.com/gp/product/B005MZN2B2/...". The ASIN (Amazon Standard Identification Number) for the book is the 10-character string that begins with a "B".
  • In calibre select your book, choose "Edit Metadata", and in the "Ids:" field add "amazon:B005MZN2B2" (without the quotes and using the ASIN you discovered). If there is something already in the "Ids:" field then separate the new information with a comma.
  • You can verify that the ASIN is set correctly by selecting the book in calibre and looking at the book details panel (usually on the far right). There should be an "Amazon.com" entry in the "Ids:" section. Click on "Amazon.com" there and your browser will open to the associated web page. Verify that the browser shows the expected book and that it is a Kindle edition, not a print edition. Use "Edit Metadata" to fix the ASIN if not.
  • Convert the book to KFX and sideload it to your kindle device.
  • After you eject your Kindle from your computer the cover thumbnail will be automatically downloaded from Amazon's servers. It should then show a cover thumbnail for the book. (Your Kindle will need to have a Wi-Fi or 3G connection for this to work properly.)


Command Line Interface:
Spoiler:

The KFX Output plugin has a command line interface for advanced users.

Code:
usage: calibre-debug -r "KFX Output" -- [-h] [-a ASIN] infile [outfile]

Convert e-book to KFX format.

positional arguments:
  infile                Pathname of the LAST, EPUB, or KPF file to be
                        converted to KFX.
  outfile               Optional pathname of the resulting KFX file.

optional arguments:
  -h, --help            show this help message and exit
  -a ASIN, --asin ASIN  Optional ASIN for thumbnail image.
Due to command parsing limitations the infile and outfile names must contain only ASCII characters.


Conversion of the Most Recent Book from the Kindle Previewer GUI

If the infile name ends with a ".last" extension it signals the plugin to locate the most recent file converted by the Kindle Previewer GUI and use that as the source for conversion to KFX. (A file should not actually exist with this name. The ".last" extension is simply used to activate this function.)

This is useful in cases where the plugin fails to function properly within the calibre GUI.

Examples:
Code:
calibre-debug -r "KFX Output" -- anyname.last output.kfx  (Converts most recent book to output.kfx)
calibre-debug -r "KFX Output" -- "my book.last"           (Produces my book.kfx)
Follow these steps to use this function:
  • Open a book using the Kindle Previewer GUI. The Previewer should show a dialog box with "Please wait while Kindle Previewer converts your book into Kindle format" followed by another dialog box with "Your book is successfully converted into Kindle format".
  • If the book opens without showing these dialogs then the Previewer is using a cached copy of the book instead of converting it. In this case, delete the contents of the "My Kindle Books" folder and open the book again in order to force conversion to occur.
  • Verify that the Previewer shows shows "Enhanced Typesetting: Supported" on the book information screen. This is displayed using Ctrl-I or by selecting View->Book Information via the program menu. If it shows "Not Supported", you will be unable to convert it to KFX.
  • Invoke the plugin from a command prompt. For example:
    calibre-debug -r "KFX Output" -- Frankenstein.last


Conversion from EPUB

If an EPUB is used as the infile it will be passed to the Amazon Kindle Previewer for conversion to KPF/KDF and then the result will be repackaged as KFX. This bypasses any manipulation of the EPUB by the calibre conversion pipeline.

Examples:
Code:
calibre-debug -r "KFX Output" -- input.epub output.kfx  (Converts input.epub to output.kfx)
calibre-debug -r "KFX Output" -- "my book.epub"         (Produces my book.kfx)
Conversion from KPF

If a KPF file is used as the infile it is repackaged as KFX.



Dealing with Conversion Errors
Spoiler:

The plugin corrects some issues in the source EPUB that could prevent conversion by Previewer: character encoding, obfuscated fonts, background RECT in SVG, language "UND", missing/duplicated title, table cell with no visible text, and a few others. But many potential problems cannot be fixed automatically.

The Previewer often fails when something unexpected is encountered in the contents of the source EPUB. Some examples of things that may cause a conversion failure are:
  • Incorrect HTML or CSS files. (The calibre editor can often be used to detect and correct these problems.)
  • Tables containing captions or borders.
  • Unusual style properties or values.
  • Complex SVG graphics and image types with internal errors.
  • Fixed layout such as children's books and comics.
  • Miscellaneous things that trigger bugs in the Previewer software.

If a conversion error occurs the plugin attempts to capture the most relevant error message from temporary log files produced by the Previewer. When this occurs an error dialog box will pop up in calibre. The error messages produced are cryptic, but better than nothing.

When Previewer errors occur it can be a tedious trial-and-error process to get a book to convert to KFX. One procedure is to use the calibre editor to selectively remove pieces of the source book until conversion is successful. This will narrow down what part of the book is causing the Previewer failure.

You can view the conversion job log after an error occurs to see all of the messages produced by the Previewer during conversion. To access the log, either click on the "Jobs: 0" label in the lower right corner of the calibre window or use the Alt-Shift-J keyboard shortcut to activate the Jobs dialog. Select the failed conversion job from the list (the most recent will be first) and click the "Show job details" button. To copy the log to the clipboard under Windows, click within the log text then press Ctrl-A (select all) and Ctrl-C (copy). You can then paste it wherever you like.

If a conversion fails and you feel that it may be caused by a problem with the plugin itself, rather than the Kindle Previewer, please report it in this thread along with the associated error message and log. If posting log contents please enclose them in [spoiler]...[/spoiler] tags.

Some typical Previewer error messages are:

Quote:
Invalid 'style/tag' combinations: [[STYLE_COMBINATION,SECTION,display:block,line-height:[1.0->5.0]]]

Invalid 'style/tag' combinations: [[STYLE_COMBINATION,P,font-size:small,margin-right:[RANGE NOT AVAILABLE]45%]]

Invalid 'style/tag' combinations: [[STYLE_COMBINATION,SPAN,font-size:large,margin-top:[RANGE NOT AVAILABLE]0.2000pt]]

Error(YJEpubAdapter):E00104: Found an unsupported tag/style {caption}{}{}

Error(YJEpubAdapter):E00403: "Unsupported Transformer for tag : TagName= span Display= inline-block ParentNode= p";

Error(YJConvValidator):E120012: Floating containers with text are not supported

Error(YJRCCommonUtils):E30005: Parent container must have valid width but here provided : 0.0
Some combinations of style property values are not allowed by the Previewer. Check and modify CSS styles.

Quote:
Error(YJEpubAdapter):E00226: "The Language given is not supported currently : ar";

Error(YJTextAnalyser):E111001: encountered Right to Left script
The languages supported by the Previewer are limited.

Quote:
Error(YJConvValidator):E120013: Data table found in the book
Previewer versions prior to 3.6 beta do not handle HTML tables with certain formatting and produce this error. Update the Previewer version.

Quote:
Error(YJConvValidator):E120016: Table with row span not supported. Table Type=layout, RowSpan=5

Error(YJConvValidator):E120017: Table with collapsed borders are not supported

Error(YJConvValidator):E120021: Images are not supported inside data tables. ContainerID=-5088645446569984068

Error(YJConvValidator):E120022: Large Data Table not supported.No. of characters=1778, No. of rows=51, No. of cells=153

Error(YJConvValidator):E120026: Unsupported double border in table.Table Type=LAYOUT_TABLE, hasTableBorder=true, hasTableRowBorder=false, hasTablecellBorder=true, hasBorderCollapse=false
This indicates that an HTML table in the book contains disallowed formatting or content. Only simple table formats are allowed.

Quote:
Error(YJEpubAdapter):E00212: "Complex SVG is not supported : ...
Only simple SVG containing a single image is allowed by the Previewer.

Quote:
Exception in thread "main" com.amazon.kcf.conversion.image.e.a: Image to Jpeg conversion failed with exit code : 1

Exception in thread "main" com.amazon.kcf.conversion.image.e.a: KindleImageConverter Failed with exit code : -1073741819error String: IMG_CONV_UNKNWON_ERROR
These indicate problems with images within the book. (They sometimes occur intermittently and so the plugin will automatically retry conversion for these errors.)

Quote:
Error(prcgen):E24010: Hyperlink not resolved in toc (One possible reason can be that the link points to a tag with style display:none)

Error(YJEpubAdapter):E00601: Internal error occured. {0}
These errors can occur when an NCX TOC entry points to an element with style display:none or to a body element.

Quote:
java.lang.IllegalArgumentException: At this point, KFX text iterator should have content to read.

Exception in thread "main" com.amazon.kcfpositionmapcreator.d.b: ErrorCode: CONTENT_MISMATCH, ErrorMessage:Not exact match - YJ=ContentFormat:YJCANONICAL, ContentType:TEXT, TextChar:​ at md pos 205,Mobi=ContentFormat:MOBI8, ContentType:TEXT, TextChar:S at 1547

Exception in thread "main" com.amazon.kcfpositionmapcreator.d.b: ErrorCode: MORE_MOBI7_CONTENT, ErrorMessage:There are more visible Mobi7 content than YJ, Content:ContentFormat:MOBI7, ContentType:SVG, TextChar:null
These errors are caused when the Previewer looses track of text positions within the book. The first error can be caused by a table cell with no visible content. The second by the character encoding of a file being undeclared or by the use of ::before or ::after CSS selectors.

Quote:
Error(YJHtmlPreprocessor):E00803: JavaScript Failure

Error(YJHtmlPreprocessor):E00809: Preprocessor simulator failure

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
These indicate that the Previewer failed in some way and are not very useful in determining the cause of the problem. Often there is nothing actually wrong with the source EPUB. The Previewer has bugs.



Limitations:
Spoiler:

The KFX format is undocumented. This plugin might sometimes produce incorrectly structured KFX files that could cause a slowdown or crash of your Kindle device or app when sideloaded. Use at your own risk!

KFX files cannot be sent using Send to Kindle by E-mail or using Send to Kindle for PC/Mac.

KFX files produced by this plugin are uncompressed and so will usually be larger than other e-book formats. (KFX files for books purchased from Amazon include data compression in conjunction with their DRM.)

The X-Ray feature is not currently available with sideloaded KFX books.

Many books cannot be successfully converted to KFX using the Kindle Previewer. Only books using reflowable layout can be converted. The Kindle Previewer does not convert books in fixed layout, such as children's books, comics, interactive magazines, and interactive textbooks. It also does not support Kindle in Motion.

This plugin only converts from other e-book formats to KFX. It does not convert from KFX to other formats.

Amazon continues to update its KFX renderer so use of the most recent firmware and app versions is recommended. Firmware version 5.6.5 or later is required for Kindle devices. Some e-book features, such as HTML tables and Page Flip, require firmware 5.7.2 or later for support in KFX.

It is unknown whether or not the Kindle Previewer will function under Linux/Wine. This plugin does not currently support that environment.

This plugin requires calibre version 2.0.0 or later. KFX files created by this plugin will not appear in the device view in calibre.


Version History:
Spoiler:


Version 1.5.0 - 27 Nov 2016

Add support for Kindle Previewer 3.6 beta. (That is now the recommended version of the Previewer for use with this version of the plugin. It converts some books containing tables that previous versions could not.)

Capture log files during the first conversion attempt. This avoids the need to perform a second conversion to capture logs if the first one fails.

Automatically retry after conversion errors that occur inconsistently.

Version 1.4.0 - 24 Oct 2016

Allow a "mobi-asin" identifier to be used as the source of the book's ASIN.

The plugin tweak "kfx_output_force_cde_type_ebok = True" will cause converted books to no longer be marked as personal documents.

Version 1.3.0 - 20 Sep 2016

An invisible character will be added to empty table cells to work around a Previewer bug. (A visible character was used previously.)

If no ASIN is specified the converted book will be marked as a "personal document" and a unique ASIN will be generated. (An ASIN is required for the support of cover thumbnails on e-ink Kindles.)

Add support for Kindle Previewer 3.5 beta. (KFX generation from Previewer version 3.5 is unchanged from version 3.4.)

Version 1.2.0 - 15 Aug 2016

Add support for Kindle Previewer 3.4 beta. (That is now the recommended version of the Previewer for use with this version of the plugin.)

Allow conversion of page numbers contained in an NCX pageList or page-map.xml within the source EPUB. (Page numbers must be present in the EPUB. "Fake" page numbers will not be produced. EPUB 3 page-list and Amazon APNX are not supported.)

Correct some issues in the source EPUB that could prevent conversion by Previewer: character encoding, obfuscated fonts, background RECT in SVG, language "UND", missing/duplicated title, table cell with no visible text, and a few others.

Include the book title in pop-up conversion failure dialogs.

Save the Kindle Previewer version used within created KFX files to aid in future debugging.

Generate a unique content_id for books that do not have an ASIN.

Version 1.1.2 - 08 Apr 2016

Fix inability to highlight text in converted books on Kindle devices.

Assure author names are in the correct format for sorting.

Allow conversion using the plugin within calibre under Mac OS.

Version 1.1.1 - 30 Mar 2016

Fix error from calibre when the plugin is updated from an older version.

Version 1.1.0 - 30 Mar 2016

Add command line interface for advanced users. This provides a means for Mac users to produce KFX files since conversion within calibre is not currently working under Mac OS.

Version 1.0.0 - 26 Mar 2016

Initial release.

Attached Files
File Type: zip KFX Output.zip (33.9 KB, 394 views)

Last edited by jhowell; Yesterday at 09:36 AM. Reason: version 1.5.0
jhowell is offline   Reply With Quote
Old 03-27-2016, 10:49 PM   #2
jhowell
Guru
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: 936
Karma: 7832731
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Open KFX with Kindle Previewer 3

KFX files produced by the KFX Conversion Output plugin can be viewed using Kindle Previewer 3. However, the Previewer supports the file extension .azw8 for opening KFX files instead of .kfx. In order to open a KFX file with the Previewer it must first be copied or renamed so that it has a .azw8 extension.

The "Open KFX with Kindle Previewer 3.bat" script can be installed in Windows to allow files with a .kfx extension to be viewed more easily.

Installation:
  • Kindle Previewer 3 must already be installed for the current user.
  • Download the .zip file attached to this post.
  • Extract the enclosed "Open KFX with Kindle Previewer 3.bat" file.
  • Place this .bat file in a permanent location of your choice on the PC.
  • Right-click the .bat file and select "Run as administrator". The script will report success or failure. Press enter to close it. (This will associate the script with .kfx files. Repeating this step will remove the association.)

Once associated the script file will execute whenever .kfx files are to be opened.


Usage:

Once installed you can then select a converted book in calibre and in the "Formats" section of the book details panel and simply click on "KFX" to open it with the Previewer. The .kfx file will be copied to a temporary .azw8 file and opened with Kindle Preview 3.


Limitations:

This script uses a simple method to create the file type association, not the best possible method.

A Command window will briefly pop up whenever the script is activated.

It has only been tested under Windows 10.

It is not available for MacOS or Linux.

Version History:
Spoiler:


Version 1.0.0 - 24 Oct 2016

Initial release.

Attached Files
File Type: zip Open KFX with Kindle Previewer 3.zip (1,004 Bytes, 53 views)

Last edited by jhowell; 10-24-2016 at 09:35 AM.
jhowell is offline   Reply With Quote
 
Advertisement
Old 03-28-2016, 04:28 AM   #3
cerem0ny
Addict
cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.
 
Posts: 307
Karma: 2754360
Join Date: Jul 2014
Location: Australia
Device: ONE, H2O, Oasis, Voyage, HD, PW2, Aura, Glo, TRST3 (in that order!)
Thank you! You're a genius and inspire me to search and regain faith and trust in humanity. God bless!

...

but what IS funny is that the okugin seems to have more success converting .kfx than the previewer itself! Go figure. Why is that?!?

Last edited by cerem0ny; 03-28-2016 at 05:27 AM.
cerem0ny is offline   Reply With Quote
Old 03-28-2016, 09:16 AM   #4
jhowell
Guru
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: 936
Karma: 7832731
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Quote:
Originally Posted by cerem0ny View Post
but what IS funny is that the okugin seems to have more success converting .kfx than the previewer itself! Go figure. Why is that?!?
The first step in the conversion process is to convert the source format to EPUB, even if the book is already in EPUB format. This process can fix some things that would otherwise cause the Previewer to fail.

For example, the Previewer fails if the source EPUB does not have UTF-8 character encoding. The initial conversion step automatically converts other encodings to UTF-8.
jhowell is offline   Reply With Quote
Old 03-28-2016, 12:12 PM   #5
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 11,644
Karma: 14072257
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Here's the log from my failed attempt:
Attached Files
File Type: txt kfx log.txt (23.8 KB, 103 views)
Nate the great is offline   Reply With Quote
Old 03-28-2016, 02:10 PM   #6
jhowell
Guru
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: 936
Karma: 7832731
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Quote:
Originally Posted by Nate the great View Post
Here's the log from my failed attempt: ...
There isn't much I can tell from it. The Previewer's conversion routine, which runs under a Java installation included with the Previewer, somehow failed to launch. There is nothing in the log to indicate why. I can't tell if the problem is specific to Windows 7 or your particular PC.

I'll try to think of a way to have the plugin gather more information on this type of failure. In the mean time I have some questions to help diagnose the problem:
  • Were there any other error messages displayed on your system when the conversion failed? If so, what?
  • Have you used the Kindle Previewer to verify that it functions properly on your system? You could try opening this book and verifying that it displays with Enhanced Typesetting (hyphenation) in the Previewer. Press Ctrl-I after opening the book in the Previewer and make sure that the information dialog shows "Enhanced Typesetting: Supported".
  • If you are running an anti-virus program could you try disabling it before launching a conversion to see if that helps?
jhowell is offline   Reply With Quote
Old 03-28-2016, 04:10 PM   #7
amordechai
Junior Member
amordechai began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2016
Device: Kindle PW
Hi. I registered only for this.

First: thank you SO much for doing this!

Sadly I tried using your plugin with the latest version of calibre and Kindle previewer 3 on my mac but i got an error message and the conversion failed.
here is the log: http://pastebin.com/uUhqQWny
I'm not using any antivirus that could interfere.

It crashed with the Frankenstein book you linked. Later I tried to import the book in kindle previewer and got the "Enhanced Typesetting: Supported" message, so this seems to work.

Thank you again for your work!
Antonio

Last edited by amordechai; 03-28-2016 at 04:18 PM.
amordechai is offline   Reply With Quote
Old 03-28-2016, 06:27 PM   #8
jhowell
Guru
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: 936
Karma: 7832731
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Quote:
Originally Posted by amordechai View Post
Sadly I tried using your plugin with the latest version of calibre and Kindle previewer 3 on my mac but i got an error message and the conversion failed.
I was not able to test the plugin under Mac OS so it is not surprising that it failed to work.

I had to make some guesses about where files are located in the Mac version of the Previewer and I guessed wrong. I will have a new version of the plugin ready in a day or two that may fix the problem. Please post a new log if the new version of the plugin still fails for you.

Thanks for your error report.
jhowell is offline   Reply With Quote
Old 03-28-2016, 07:37 PM   #9
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 11,644
Karma: 14072257
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by jhowell View Post
There isn't much I can tell from it. The Previewer's conversion routine, which runs under a Java installation included with the Previewer, somehow failed to launch. There is nothing in the log to indicate why. I can't tell if the problem is specific to Windows 7 or your particular PC.

I'll try to think of a way to have the plugin gather more information on this type of failure. In the mean time I have some questions to help diagnose the problem:
  • Were there any other error messages displayed on your system when the conversion failed? If so, what?
  • Have you used the Kindle Previewer to verify that it functions properly on your system? You could try opening this book and verifying that it displays with Enhanced Typesetting (hyphenation) in the Previewer. Press Ctrl-I after opening the book in the Previewer and make sure that the information dialog shows "Enhanced Typesetting: Supported".
  • If you are running an anti-virus program could you try disabling it before launching a conversion to see if that helps?
The converter works, yes, and it did make a couple ebooks with the enhancements. I saw the hyphenation.

Then it asked me to update to 3.1, which I did.

After that I ran the plugin again in calibre, and this time it told me that KindleImageConverter failed (twice, on one job).

And then, on the next try, it converted the ebook which had failed 4 times already.

So now it is working - sorta.
Nate the great is offline   Reply With Quote
Old 03-29-2016, 12:12 AM   #10
Alice Green
Junior Member
Alice Green began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Nov 2015
Device: kindle voyage, kindle paperwhite
How can I use the Amazon Kindle Previewer to convert from EPUB to KDF, when I open the EPUB via Kindle Previewer, it convert it to Mobi format. I have not seen any convert options to KDF.
Alice Green is offline   Reply With Quote
Old 03-29-2016, 12:31 AM   #11
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 11,644
Karma: 14072257
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
Quote:
Originally Posted by Alice Green View Post
How can I use the Amazon Kindle Previewer to convert from EPUB to KDF, when I open the EPUB via Kindle Previewer, it convert it to Mobi format. I have not seen any convert options to KDF.
The easiest way is to do it via calibre.

But to be clear, that "Mobi" file you just made isn't just a Mobi file. Did you notice how it is several times the size of the Epub you started with? That's because it actually contains several different ebooks, including the original Epub, Mobi, and the new KFX.
Nate the great is offline   Reply With Quote
Old 03-29-2016, 04:27 AM   #12
amordechai
Junior Member
amordechai began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Mar 2016
Device: Kindle PW
Quote:
Originally Posted by jhowell View Post
I was not able to test the plugin under Mac OS so it is not surprising that it failed to work.

I had to make some guesses about where files are located in the Mac version of the Previewer and I guessed wrong. I will have a new version of the plugin ready in a day or two that may fix the problem. Please post a new log if the new version of the plugin still fails for you.

Thanks for your error report.
I wil definitely try the new version of the plugin and report back.

Thanks for your work!
amordechai is offline   Reply With Quote
Old 03-29-2016, 05:59 AM   #13
cerem0ny
Addict
cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.cerem0ny ought to be getting tired of karma fortunes by now.
 
Posts: 307
Karma: 2754360
Join Date: Jul 2014
Location: Australia
Device: ONE, H2O, Oasis, Voyage, HD, PW2, Aura, Glo, TRST3 (in that order!)
Wish I kept my Aura H2O! Can't remember any problems with the typography but this conversion process is so hit and miss, it's annoying! Props for the plugin however
cerem0ny is offline   Reply With Quote
Old 03-29-2016, 09:41 AM   #14
enjambement
Junior Member
enjambement began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2016
Device: Voyage
Azw3

if you use the book "Azw3", you can convert the book in KFX always. Sorry for my English, I'm Italian.
enjambement is offline   Reply With Quote
Old 03-29-2016, 11:48 AM   #15
jhowell
Guru
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: 936
Karma: 7832731
Join Date: Nov 2011
Location: Florida
Device: iPad Air 2, Kindle PW2, Nexus 7, Fire 5th Gen
Quote:
Originally Posted by Nate the great View Post
And then, on the next try, it converted the ebook which had failed 4 times already.
So now it is working - sorta.
Conversion by the plugin is dependent on Amazon's Kindle Previewer working properly and Amazon didn't do a very good job of with that software. For me it fails on more books than it works, but it does work or fail consistently on any particular book.

I don't know why it functions inconsistently for you and presumably others. It may be due to a bug in the plugin, but since I can't duplicate the problem I am unable to diagnose it further at the moment.

Quote:
Originally Posted by Alice Green View Post
How can I use the Amazon Kindle Previewer to convert from EPUB to KDF, when I open the EPUB via Kindle Previewer, it convert it to Mobi format. I have not seen any convert options to KDF.
You do not need to locate the KDF files created by the Kindle Previewer to make use of the KFX Output plugin. It invokes the conversion function of the Previewer and uses the resulting KDF file automatically. But for those interested, I will describe more of how it works.

After opening a book with the Kindle Previewer you will usually see a dialog box with the message "Your book successfully converted into Kindle format" with a link to a folder containing all of the MOBI files produced by the Previewer. This message is a bit misleading since it doesn't let you know whether or not allowing Enhanced Typesetting succeeded for that book.

The Previewer generates a KDF file for each book, but only if it succeeds at converting it for Enhanced Typesetting. To tell if this was successful you need to check the book information screen using Ctrl-I or by selecting View->Book Information via the program menu. If this shows "Enhanced Typesetting: Supported" then a KDF file was produced. If it show "Not Supported" then it failed to produced the KDF.

The KDF file will be in a recently created subdirectory of your TEMP directory. A different random subdirectory is used for each book. You need to locate the one created at the time that you opened your book in the Previewer. For example, on my Windows PC the TEMP directory is "C:\Users\John\AppData\Local\Temp" and I can find the most recently converted book within it named "145a-0754-be2f-1d6e\book\book.kdf".
jhowell is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Conversion Output] KePub Output Plugin jgoguen Plugins 188 11-18-2016 06:47 PM
Conversion output plugins? jgoguen Development 14 08-10-2013 12:19 PM
Output file name after conversion dbellefuil Calibre 2 06-14-2013 05:40 PM
catalogue builder output columns are not in the same order in the output KWhytte Library Management 5 12-04-2012 03:03 AM
Conversion output folders TechieLady Conversion 6 01-19-2012 03:49 AM


All times are GMT -4. The time now is 09:30 PM.


MobileRead.com is a privately owned, operated and funded community.