Mobileread
Kindle Previewer version 3.32 and KPF
#1  jhowell 08-14-2019, 09:11 AM
Amazon has released version 3.32 of the Kindle Previewer. The major change is the introduction of a command line interface that can convert source files into KPF format. It also supports batch conversion of multiple files at once. Once a book is in KPF format it can be viewed with the Previewer GUI or uploaded to Amazon for publishing.

This provides a new possible workflow for publishers. It will be interesting to see if there are any differences in the resulting Kindle book if it is published using a Previewer generated KPF instead of a Master MOBI from kindlegen or a source format such as EPUB or MS Word.

KPF (Kindle Package Format) is a variant of KFX, the format that enables Enhanced Typesetting. Amazon's Kindle Create and Kindle Textbook Creator software have produced this format for some time. The KFX Output plugin for calibre is capable of converting KPF format into KFX that can be sideloaded to kindle apps and devices, a feature that Amazon does not currently provide.

Quote
Usage instructions: kindlepreviewer <input> <-command(s)> [-option(s)]
Reply 

#2  lumpynose 08-15-2019, 01:49 AM
Doing command line stuff on Windows is so ugly and unpleasant. Why couldn't they implement it with the UI?
Reply 

#3  lumpynose 08-15-2019, 02:02 AM
Converting in Calibre from KPF to KFX blew up with this error:

Spoiler Warning below






calibre, version 3.46.0
ERROR: KFX conversion failed:

Cannot convert Charles Emmett van Loan assorted stories

Exception(u'Conflicting div -kfx-vertical-align and vertical-align in same style: -kfx-style-name: 4450; font-weight: bold; padding-bottom: 0.03125lh; padding-left: 0.146%%; padding-right: 0.146%%; padding-top: 0.03125lh; vertical-align: baseline;

Conflicting div -kfx-vertical-align and vertical-align in same style: -kfx-style-name: 4450; font-weight: bold; padding-bottom: 0.03125lh; padding-left: 0.146%%; padding-right: 0.146%%; padding-top: 0.03125lh; vertical-align: baseline;

Conflicting div -kfx-vertical-align and vertical-align in same style: -kfx-style-name: 4450; font-weight: bold; padding-bottom: 0.03125lh; padding-left: 0.146%%; padding-right: 0.146%%; padding-top: 0.03125lh; vertical-align: baseline;

Conflicting div -kfx-vertical-align and vertical-align in same style: -kfx-style-name: 4450; font-weight: bold; padding-bottom: 0.03125lh; padding-left: 0.146%%; padding-right: 0.146%%; padding-top: 0.03125lh; vertical-align: baseline;

Conflicting div -kfx-vertical-align and vertical-align in same style: -kfx-style-name: 4450; font-weight: bold; padding-bottom: 0.03125lh; padding-left: 0.146%%; padding-right: 0.146%%; padding-top: 0.03125lh; vertical-align: baseline;

Conflicting div -kfx-vertical-align and vertical-align in same style: -kfx-style-name: 4450; font-weight: bold; padding-bottom: 0.03125lh; padding-left: 0.146%%; padding-right: 0.146%%; padding-top: 0.03125lh; vertical-align: baseline;',)

I do get errors when I convert it with kindlegen, which I've been blithely ignoring:

Spoiler Warning below






************************************************** ***********
Amazon kindlegen(Windows) V2.9 build 1029-0897292
A command line e-book compiler
Copyright Amazon.com and its Affiliates 2014
************************************************** ***********

Info(prcgen):I1047: Added metadata dc:Title "Charles Emmett van Loan assorted stories"
Info(prcgen):I1047: Added metadata dc:Creator "Charles Emmett van Loan"
Info(prcgen):I1052: Kindle support cover images but does not support cover HTML. Hence using the cover image specified and suppressing cover HTML in content. URL: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \cover.xhtml
Info(prcgen):I1002: Parsing files 0000037
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheFlightOfTheCoyoteSpecial.xhtml line: 0000029
Warning(htmlprocessor):W28004: Absolute value specified for CSS property in content is not supported by Kindle readers. Please use % or refer Kindle Publishing Guidelines about usage of property: 'line-height' in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Styl es\reset_blitz.css
Warning(htmlprocessor):W28004: Absolute value specified for CSS property in content is not supported by Kindle readers. Please use % or refer Kindle Publishing Guidelines about usage of property: 'line-height' in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Styl es\stylesheet-2019-08-11.css
Warning(htmlprocessor):W28001: CSS style specified in content is not supported by Kindle readers. Removing the CSS property: 'max-width' in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Styl es\stylesheet-2019-08-11.css
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000019
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000063
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000151
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000251
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000361
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000431
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000495
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000615
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000641
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000687
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000775
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheMessageToBuckshotJohn.xhtml line: 0000861
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WhenThievesFallOff.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header class="bridgehead">
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WhenThievesFallOff.xhtml line: 0000019
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ForBrodiesBenefit.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ForBrodiesBenefit.xhtml line: 0000085
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ForBrodiesBenefit.xhtml line: 0000213
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TalesOfTheMidnightClub.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \BuckParvinAndTheMovies-tp.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheExtraManAndTheMilkfedLion.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheExtraManAndTheMilkfedLion.xhtml line: 0000085
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheExtraManAndTheMilkfedLion.xhtml line: 0000185
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheExtraManAndTheMilkfedLion.xhtml line: 0000259
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheExtraManAndTheMilkfedLion.xhtml line: 0000333
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheExtraManAndTheMilkfedLion.xhtml line: 0000387
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheInternationalCup.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheInternationalCup.xhtml line: 0000091
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheInternationalCup.xhtml line: 0000167
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheInternationalCup.xhtml line: 0000247
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheInternationalCup.xhtml line: 0000359
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \TheInternationalCup.xhtml line: 0000407
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ManAfraidOfHisWardrobe.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ManAfraidOfHisWardrobe.xhtml line: 0000057
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ManAfraidOfHisWardrobe.xhtml line: 0000185
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ManAfraidOfHisWardrobe.xhtml line: 0000271
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \ManAfraidOfHisWardrobe.xhtml line: 0000351
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000151
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000219
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000315
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000387
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000431
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \WaterStuff.xhtml line: 0000535
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \BucksLadyFriend.xhtml line: 0000013
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \BucksLadyFriend.xhtml line: 0000185
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \BucksLadyFriend.xhtml line: 0000317
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \BucksLadyFriend.xhtml line: 0000485
Warning(inputpreprocessor):W29004: Forcefully closed opened Tag: <header>
in file: d:\tmp\mbp_7E3_8_E_17_0_6_2F_3CC_1710_1\OEBPS\Text \BucksLadyFriend.xhtml line: 0000525
Info(prcgen):I1015: Building PRC file
Info(prcgen):I1006: Resolving hyperlinks
Info(prcgen):I1008: Resolving start reading location
Info(pagemap):I8000: No Page map found in the book
Info(prcgen):I1045: Computing UNICODE ranges used in the book
Info(prcgen):I1046: Found UNICODE range: Basic Latin [20..7E]
Info(prcgen):I1046: Found UNICODE range: General Punctuation - Windows 1252 [2018..201A]
Info(prcgen):I1046: Found UNICODE range: Latin-1 Supplement [A0..FF]
Info(prcgen):I1046: Found UNICODE range: Latin Extended-A [100..17F]
Info(prcgen):I1017: Building PRC file, record count: 0000390
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 55.10%
Info(prcgen):I1040: The document identifier is: "Charles_Emme-sorted_stories"
Info(prcgen):I1041: The file format version is V6
Info(prcgen):I1031: Saving PRC file
Info(prcgen):I1032: PRC built successfully
Info(prcgen):I1016: Building enhanced PRC file
Info(prcgen):I1007: Resolving mediaidlinks
Info(prcgen):I1011: Writing mediaidlinks
Info(prcgen):I1009: Resolving guide items
Info(prcgen):I1017: Building PRC file, record count: 0000405
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 55.03%
Info(prcgen):I1041: The file format version is V8
Info(prcgen):I15000: Approximate Standard Mobi Deliverable file size : 0000963KB
Info(prcgen):I15001: Approximate KF8 Deliverable file size : 0001007KB
Info(prcgen):I1036: Mobi file built successfully
Reply 

#4  jhowell 08-15-2019, 11:52 AM
Quote lumpynose
Doing command line stuff on Windows is so ugly and unpleasant. Why couldn't they implement it with the UI?
I suspect that this new CLI is intended as a replacement for kindlegen.

I agree that it would be nice if the export function of the Previewer GUI would allow KPF as an option. Perhaps in a future release.

Quote lumpynose
Converting in Calibre from KPF to KFX blew up with this error:
...
I do get errors when I convert it with kindlegen, which I've been blithely ignoring
The problem does not appear to have anything to do with the kindlegen warnings. By using calibre's GUI to convert from KPF to KFX you are actually converting from KPF to EPUB and then from EPUB to KFX. In this case the conversion to EPUB is failing due to unexpected content in the KPF file that the KFX Input plugin cannot handle.

I would like to fix this. It would be helpful if you could post the source file you used, as long as the book is not under copyright. (If it is still under copyright you could feed it through the ScrambleEbook calibre plugin to remove the text while retaining the formatting.)

If you use the command line interface of the KFX Output plugin it will avoid the step of converting to and from EPUB, which is part of calibre's GUI conversion process. That will repackage the content from the KPF file into a KFX container.
Reply 

#5  lumpynose 08-15-2019, 02:52 PM
Quote jhowell
I would like to fix this. It would be helpful if you could post the source file you used, as long as the book is not under copyright.
Thanks.

Here's the epub:

https://www.mobileread.com/forums/sh...d.php?t=322110
Reply 

#6  jhowell 08-15-2019, 04:06 PM
Quote lumpynose
Here's the epub:
https://www.mobileread.com/forums/sh...d.php?t=322110
Thanks for that!

I was able to duplicate the problem and will be able to fix it in the next release of the KFX Input plugin.
Reply 

#7  lumpynose 08-15-2019, 04:43 PM
If all I want to do is convert an epub file to kfx I'm guessing that I don't need to use the command line interface to kindle previewer 3 to make the kpf and can follow your instructions for generating the kfx using your kfx output plugin?
Reply 

#8  jhowell 08-15-2019, 06:42 PM
Quote lumpynose
If all I want to do is convert an epub file to kfx I'm guessing that I don't need to use the command line interface to kindle previewer 3 to make the kpf and can follow your instructions for generating the kfx using your kfx output plugin?
That is correct.
Reply 

#9  odamizu 08-17-2019, 12:58 AM
Quote jhowell
I suspect that this new CLI is intended as a replacement for kindlegen.
Hello jhowell! What does this mean, CLI is intended as a replacement for kindlegen?

Does this new KindlePreviewer not have kindlegen inside? Can one still export a mobi containing KF8 using this new KindlePreviewer?

Thank you
Reply 

#10  jhowell 08-17-2019, 06:09 AM
Quote odamizu
Does this new KindlePreviewer not have kindlegen inside? Can one still export a mobi containing KF8 using this new KindlePreviewer?
Yes it has kindlegen and can export MOBI. The new CLI will even produce MOBI if the conversion to KPF fails.

Quote odamizu
What does this mean, CLI is intended as a replacement for kindlegen?
It is just my supposition that in the long run Amazon will want publishers to run their books through the Previewer and publish using KPF instead of using kindlegen and MOBI.

It is just a guess at where they are headed and may never happen.
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register