Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 10-18-2018, 02:58 PM   #1
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
[KINDLE] Page Flip not working on Kindle with books converted by Calibre

Hey, Guys.

I've recently bought a Kindle Paperwhite (7th Generation). I converted a lot of ePub books to AZW3 with Calibre. These converted books were sent to my Kindle directly by Calibre.

Well, they all work fine. The conversion was perfect, except for one little detail: the Page Flip mechanism doesn't work for them (not entirely, anyway).

When I open one of those books, the Page Flip only offers the first option (page by page); the second option (grid) is always grayed out.

For testing, I used one of my books bought from the Kindle Store. The original one supports both Page Flip modes. When I striped the DRM and send it back to my device, the Page Flip breaks. This also happens with other books originally created as an ePub.

I don't know if this is an issue with Kindle (maybe its something available only for purchased books, like the "About this book" feature), or if there is any option I could change on Calibre to get it to work.

By the way: I didn't change any of the default converting options.


My Device:

Kindle Paperwhite 7th Generation
Firmware: 5.10.1.1

Last edited by thiago.eec; 10-18-2018 at 03:01 PM.
thiago.eec is offline   Reply With Quote
Old 10-18-2018, 03:59 PM   #2
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Page Flip is one of several Kindle features that are only available in KFX format. You can produce KFX in calibre using the optional KFX Output plugin.

There are some limitations to the format. See the plugin description for details.
jhowell is offline   Reply With Quote
Old 10-19-2018, 11:34 AM   #3
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by jhowell View Post
Page Flip is one of several Kindle features that are only available in KFX format. You can produce KFX in calibre using the optional KFX Output plugin.
Thank you very much for your reply, and for the great plugin!

I've tested the plugin and it works almost perfectly. The only trouble I had was with some <hr> instances within the book. Altough they have the css border property set to "none", the border shows up when the book is converted. If I change the <hr> to a div, then the problem goes away. Any idea what may be causing that? The <hr> has a backgroud image, by the way.

Quote:
Originally Posted by jhowell View Post
There are some limitations to the format. See the plugin description for details.
What would those limitations be? I read the topic but couldn't find any limitation (except for the possible bugs on the convertion; but those are not inherent to the format).
thiago.eec is offline   Reply With Quote
Old 10-19-2018, 03:17 PM   #4
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by thiago.eec View Post
I've tested the plugin and it works almost perfectly. The only trouble I had was with some <hr> instances within the book. Altough they have the css border property set to "none", the border shows up when the book is converted. If I change the <hr> to a div, then the problem goes away. Any idea what may be causing that? The <hr> has a backgroud image, by the way.
I was not able to duplicate this problem with a quick test. It is most likely an issue in the conversion done within the Kindle Previewer.

If you would like me to look into it further you will need to supply a sample EPUB that demonstrates the problem when converted. (Nothing under copyright, please!)

Quote:
Originally Posted by thiago.eec View Post
What would those limitations be? I read the topic but couldn't find any limitation (except for the possible bugs on the convertion; but those are not inherent to the format).
A major one is that books in KFX need to be sideloaded. They cannot be e-mailed to your Amazon account. That prevents them from syncing reading position and highlights between multiple Kindle apps and devices.

You may have problems if you use out-of-date Kindle firmware. KFX format has changed over time and sideloading bypasses checks Amazon does to make sure the KFX features contained within the book are supported by your device.

See the "Limitations" section of the KFX Output plugin documentation for more potential problems.
jhowell is offline   Reply With Quote
Old 10-19-2018, 04:46 PM   #5
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by jhowell View Post
I was not able to duplicate this problem with a quick test. It is most likely an issue in the conversion done within the Kindle Previewer.

If you would like me to look into it further you will need to supply a sample EPUB that demonstrates the problem when converted. (Nothing under copyright, please!)
For testing, I used the ebook you sent for the example on the plugin post (Mary Shelley's Frankenstein).

I'm sending the modified ePub, including the <hr> elements. I can't send the KFX file, since the forum doesn't allow this kind of file. The rules were inserted below each Letter/Chapter title.

To help visualizing the problem, I also sent the printscreens of both ePub and KFX files.
Attached Thumbnails
Click image for larger version

Name:	ePub.png
Views:	420
Size:	114.6 KB
ID:	167029   Click image for larger version

Name:	Kindle.png
Views:	484
Size:	60.9 KB
ID:	167030  
Attached Files
File Type: epub Frankenstein - Mary W. Shelley.epub (323.3 KB, 222 views)
thiago.eec is offline   Reply With Quote
Old 10-19-2018, 08:24 PM   #6
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by thiago.eec View Post
For testing, I used the ebook you sent for the example on the plugin post (Mary Shelley's Frankenstein)...
Thanks! That was great. I can see that the problem is that calibre’s conversion pipeline rewrites the CSS for the border in a way that is unacceptable to the Kindle Previewer.

A workaround is to use the command line interface to the plugin, which will bypass any alteration of the EPUB by calibre, preventing the problem.

I will try to come up with a better solution for the next plugin release.
jhowell is offline   Reply With Quote
Old 10-21-2018, 10:52 AM   #7
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by jhowell View Post
Thanks! That was great. I can see that the problem is that calibre’s conversion pipeline rewrites the CSS for the border in a way that is unacceptable to the Kindle Previewer.

A workaround is to use the command line interface to the plugin, which will bypass any alteration of the EPUB by calibre, preventing the problem.

I will try to come up with a better solution for the next plugin release.
Thanks for the quick reply and the effort to solve this!

I did as you suggested and used the command line interface. It did the job avoiding the borders, altough one last problem remains: it is altering the gif image.

When I visualize the KFX (azw8) on KindlePreviewer (see the attached screenshot), it looks perfect, just like the ePub. But, when I sideload it to the device, on the Kindle Paperwhite screen, the gif has a gray background (see the screenshot attached). This gif is supposed to be tranparent. It shows properly on the device when I use AZW3 format, or when I convert it using KindlePreviewer directly (altough it will save on MOBI format).

How can I configure the convertion so it doesn't touch the images? Through Calibre, I used your suggestion to change the output page configuration to "Tablet", but it still causes the gray background.

I am intrigued that when KindlePreviewer exports the MOBI file, the image looks fine on the device. It looks like the KFXOutput plugin is changing the image in some way, after the KindlePreviewer does his job (compression, maybe?).
Attached Thumbnails
Click image for larger version

Name:	KindlePreviewer.png
Views:	330
Size:	76.3 KB
ID:	167083   Click image for larger version

Name:	Kindle Paperwhite.png
Views:	337
Size:	57.5 KB
ID:	167084  
thiago.eec is offline   Reply With Quote
Old 10-21-2018, 08:02 PM   #8
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by thiago.eec View Post
When I visualize the KFX (azw8) on KindlePreviewer (see the attached screenshot), it looks perfect, just like the ePub. But, when I sideload it to the device, on the Kindle Paperwhite screen, the gif has a gray background (see the screenshot attached). This gif is supposed to be tranparent. It shows properly on the device when I use AZW3 format, or when I convert it using KindlePreviewer directly (altough it will save on MOBI format).
The Amazon Kindle Publishing Guidelines explicitly state that image transparency is not supported, even though it does work in many cases.

When producing KFX format the Kindle Previewer converts all images to JPEG format causing transparency to be lost. You cannot prevent this.

The transparent background should be made white in the process, not gray. That is the case when I convert the modified Frankenstein book that you attached earlier in this thread.

If you attach your sample that instead shows a gray background when sideloaded then I will try to determine why it is not working as expected. I was able to reproduce the problem using the book you uploaded previously and I am looking into it.

Quote:
Originally Posted by thiago.eec View Post
I am intrigued that when KindlePreviewer exports the MOBI file, the image looks fine on the device.
I believe that the exported MOBI will contain the original GIF images with transparency, but it is not guaranteed to render properly on all Kindle apps/devices.

Last edited by jhowell; 10-21-2018 at 08:09 PM.
jhowell is offline   Reply With Quote
Old 10-21-2018, 08:35 PM   #9
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by jhowell View Post
The Amazon Kindle Publishing Guidelines explicitly state that image transparency is not supported, even though it does work in many cases.
You are right. Its very clear. But it does work when I use AZW3 (converted by Calibre) or MOBI (produced by Kindle Previewer). And, funny enough, those formats retain the original GIF, with its transparency, as I could check using KindleUnpack plugin.

Quote:
Originally Posted by jhowell View Post
When producing KFX format the Kindle Previewer converts all images to JPEG format causing transparency to be lost. You cannot prevent this.
Like I said above, Kindle Previewer is not converting GIF to JPEG.
Also, according to the guide you pointed out (item 9.4.1 - Use Supported Input Formats), GIFs are supported for Enhanced Typesetting (KFX, right?). It only states that multi-frame GIFs are unsupported.

Quote:
Originally Posted by jhowell View Post
The transparent background should be made white in the process, not gray. That is the case when I convert the modified Frankenstein book that you attached earlier in this thread.

If you attach your sample that instead shows a gray background when sideloaded then I will try to determine why it is not working as expected. I was able to reproduce the problem using the book you uploaded previously and I am looking into it.
Thank you!

Quote:
Originally Posted by jhowell View Post
I believe that the exported MOBI will contain the original GIF images with transparency, but it is not guaranteed to render properly on all Kindle apps/devices.
Yes. Indeed, both the MOBI exported and the AZW3, retain the original GIF, as I said above.
thiago.eec is offline   Reply With Quote
Old 10-21-2018, 09:04 PM   #10
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
I tried the book in KFX format on a Kindle Oasis and the gray rectangle was present as you showed. I also sideloaded it to the Kindle for Android app and Kindle for PC. Both of those showed it correctly, without the gray rectangle. So it appears to be a problem specific to e-ink Kindles.

As far as I can tell, in KFX format on an e-ink Kindle an <hr> is rendered with an implicit gray background color. It can be made darker, but not lighter.

Changing the EPUB so that the image is rendered using a <div> instead of <hr> causes it to work properly even on the Oasis. I don't have a work-around other than making this change.

(Thanks for the learning experience.)
jhowell is offline   Reply With Quote
Old 10-21-2018, 09:12 PM   #11
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by thiago.eec View Post
Like I said above, Kindle Previewer is not converting GIF to JPEG.
It doesn't convert GIF to JPEG when producing MOBI. It always converts when producing KFX. The processing is different.

Quote:
Originally Posted by thiago.eec View Post
Also, according to the guide you pointed out (item 9.4.1 - Use Supported Input Formats), GIFs are supported for Enhanced Typesetting (KFX, right?). It only states that multi-frame GIFs are unsupported.
PNG is also supported as an input format. That is converted to other image formats even when producing MOBI.

It does not state anywhere that input formats will be delivered unchanged to customers.
jhowell is offline   Reply With Quote
Old 10-21-2018, 09:38 PM   #12
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 921
Karma: 1177583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by jhowell View Post
I tried the book in KFX format on a Kindle Oasis and the gray rectangle was present as you showed. I also sideloaded it to the Kindle for Android app and Kindle for PC. Both of those showed it correctly, without the gray rectangle. So it appears to be a problem specific to e-ink Kindles.

As far as I can tell, in KFX format on an e-ink Kindle an <hr> is rendered with an implicit gray background color. It can be made darker, but not lighter.

Changing the EPUB so that the image is rendered using a <div> instead of <hr> causes it to work properly even on the Oasis. I don't have a work-around other than making this change.

(Thanks for the learning experience.)

Thank you very much for the effort and patience, since this is just a minor e very specific problem.

With your guidance, I think I got a solution.

As I was doing some more testing with another image (wich has a white background), I came to realize that the problem was never the images. The problem is with <hr>, like you also figured. More specificaly, the problem lies on the <hr> element background color.

So, I supressed the color hex code (#FFFFFF) and it just solved the problem!

Go figure... It seems that white (#FFFFFF) shows up as a light gray on e-ink screens, or something like that.

See the attached modified Shelly's book (KFX inside the RAR). It now renders correctly on my Kindle Paperwhite, which made me very happy.
Attached Files
File Type: rar Frankenstein - Mary W. Shelley.rar (299.4 KB, 182 views)
thiago.eec is offline   Reply With Quote
Old 10-22-2018, 10:44 AM   #13
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: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by thiago.eec View Post
So, I supressed the color hex code (#FFFFFF) and it just solved the problem!
Very strange.

I'm glad that you were able to find a way to make it work.
jhowell is offline   Reply With Quote
Reply

Tags
azw3 conversion, kindle paperwhite 7, page flip


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle shows blank page when using page flip Julius Caesar Amazon Kindle 12 09-11-2018 04:49 PM
Page Flip -- New Kindle Feature tubemonkey Amazon Kindle 93 07-24-2016 12:16 AM
Kindle Page Flip AudibleHippo Devices 1 06-28-2016 10:54 PM
E-mailing converted books from Calibre to Kindle mdeweez Library Management 10 01-25-2015 09:26 PM
Problem with calibre-converted books on Kindle Paperwhite 2 Stridr Amazon Kindle 6 11-15-2013 02:58 AM


All times are GMT -4. The time now is 04:18 AM.


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