06-16-2021, 01:50 PM | #1 | |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
"text-indent" not working in Kindle for iOS
I'm trying to convert some ePub books into mobi to be sent to Kindle for iOS but seems the application has some kind of bug that ignores this css property.
Original ePub <p> has in style.css property of "text-indent" set to 1.5em. Same ebook in Kindle e-ink devices and Android Kindle app formats right the first line in a paragraph, but Kindle for iOS not and is shown without any indentation. This is the css part: Quote:
|
|
06-16-2021, 03:00 PM | #2 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
It is even worse, at start of each chapter, it does not show first line... Sending as "Both" types of mobi seems the paragraph is resolved, but still first line of chapter is not shown.
|
Advert | |
|
06-16-2021, 03:34 PM | #3 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Even setting the style for the paragraph from one AZW from Amazon, fails. However, the original book does not fail.
I'm start thinking this is intentional. Seems the only way to make this work is selecting "Completely removing Margin" option in Look & Feel. |
06-16-2021, 03:35 PM | #4 |
Grand Sorcerer
Posts: 6,557
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I have looked at many MOBI books in Kindle for iOS and have never experienced a problem with missing text indent or missing first lines of chapters. There is likely something wrong with your book that is leading to this behavior.
Have you checked your original EPUB for problems using EPUBCheck or a similar tool? How are you produce the MOBI file? calibre, Kindle Previewer, or something else? Can you post a non-copyrighted sample file that exhibits this problem? |
06-16-2021, 03:39 PM | #5 | |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Quote:
I produce it with Calibre. And sorry, no, I cannot sample a non-copyrighted book. :-( I will continue with my fight. |
|
Advert | |
|
06-16-2021, 06:17 PM | #6 |
Resident Curmudgeon
Posts: 74,585
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
rfog, use the Scramble eBook plugin and try the scrambled eBook. If it still shows the error(s), then you can attach it here so it can be looked at to see what might br going on.
|
06-17-2021, 02:07 AM | #7 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Thanks, JSWolf, I didn't knew that Calibre Plugin
Attaching original and converted scrambled from original, no special options set to do the conversion in Calibre. Uploaded captures shows the most important issue. Central image is black but should contain some lines, the starting of the chapter. And sometimes, going back and forth between pages, the omitted lines are shown. |
06-17-2021, 07:31 PM | #8 |
Grand Sorcerer
Posts: 6,557
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
The EPUB file has a class named saltoinicio which sets margin-top:33% for the first paragraph of a chapter. Percentage for a margin is based on the width of the container so for a typical portrait page orientation that should make the paragraph start about a quarter of the way down the page.
In the MOBI file produced by calibre that 33% is changed to instead be 150em, which is an unreasonably huge value! That looks to me like a calibre bug. This in turn appears to trigger a bug in the MOBI renderer under iOS, causing the paragraph to start on the next page with some of the initial text missing. The MOBI renderer obviously should not be doing that, but it is somewhat of a garbage-in garbage-out situation. I converted the EPUB to MOBI using Amazon's Kindle Previewer and in the MOBI file that it creates it leaves the value at 33% and this works OK when loaded into Kindle for iOS. So one possible fix to to use that instead of calibre for this conversion. |
06-18-2021, 02:11 AM | #9 | |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Quote:
I'm going to attack this in 3 ways. 1) File a Calibre bug based in this conversation to see if Covid can do something. 2) File a Amazon bug, as same ebook is shown right in e-ink devices and Android ones but not in iOS. 3) Change that "saltoinicio" to a reasonable value or remove it. BTW, do someone how to file a bug to Amazon? I found nothing in their website. |
|
06-18-2021, 02:42 AM | #10 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Back again. I found a workaround for this, that is add a rule in Look & Feel.
Basically, if "magin-top" is higher or equal than 20% it is changed to "10em" I'm attaching here. BTW, this is basically for EPL/EPG Libraries. Last edited by rfog; 06-18-2021 at 02:57 AM. |
06-18-2021, 09:08 AM | #11 |
Grand Sorcerer
Posts: 6,557
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I enjoy looking into odd problems like this.
I don't know of any way to get in touch with the right people and I doubt that they would do anything about this problem even if you could. Almost all books sold by Amazon are delivered in KFX format these days. MOBI and KF8 are legacy formats and the rendering software for them has not been changed in many years. |
06-22-2021, 07:10 AM | #12 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Filed a bug:
https://bugs.launchpad.net/calibre/+bug/1932392 (And result from Kovid). Whatever the problem could be, it is not going to be resolved. :-( He generated one AZW well (but I wanted a mobi with "both" inside). |
06-22-2021, 12:43 PM | #13 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
Many thanks, @jhowell, for adding to the bug report.
|
06-22-2021, 03:56 PM | #14 |
Grand Sorcerer
Posts: 6,557
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I will repeat the two comments that I posted to the calibre bug tracker here in case they are on interest to anyone following this discussion.
---------------------------- This problem was first noticed in the Kindle for iOS app which uses the old MOBI part of the file. In the original EPUB the file 003.xhtml starts with "<p class="saltoinicio asangre">Rwe jfbnmv qw ey Ydfjdh cxw xtytccn". The style for class "saltoinicio" in style.css is ".saltoinicio { margin-top:33%; }". So the intent is to have the paragraph start part of the way down the screen. The corresponding old MOBI content produced by calibre is "<p height="150em" width="0pt" align="justify">Rwe jfbnmv qw ey Ydfjdh cxw xtytccn". The 33% value has been converted to 150em. This makes no sense to me. It implies that a screen width of 450em was used as the conversion factor. This huge value causes the MOBI renderer to perform incorrectly in the Kindle for iOS app resulting in the initial text of that paragraph not being displayed. When the same EPUB is run through kindlegen the old MOBI part of the result instead has "<p height="33%" width="0" align="justify">Rwe jfbnmv qw ey Ydfjdh cxw xtytccn". This renders much better when tested using the Kindle for iOS app and also on an old Kindle 2 device. ---------------------------- I was able to determine what is happening in this case. I always convert using the Tablet profile in order to prevent images from being downsized. It did not occur to me that the screen size set by the Output Profile also comes into play during conversion of sizes in the content of the book. Selecting the Kindle output profile (525x640 pixels) instead of Tablet (10,000x10,000 pixels) changed the top margin from 150em down to a far more reasonable value of 5em. The resulting MOBI file renders fine under Kindle for iOS. In the end this is a case of user error. Still, it would be nice if there was a way to avoid downsizing images while at the same time having reasonable screen dimensions for size calculations during conversion. |
06-23-2021, 03:05 AM | #15 |
Guru
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
|
I had the exact same idea, input profile to to not downscale graphics, but I changed to Kindle and still had the same issue in other books.
We will see the next update done by Kovid in next version. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Book Editor - "Previous" button under text search not working | VirgoGirl | Calibre | 13 | 06-02-2019 11:16 AM |
App Syncs "copied" text (including eBook clips) between iOS and OSX | 1611mac | Apple Devices | 6 | 01-25-2013 08:23 AM |
Where are my "Clippings"/Highlights on Kindle iOS app ? | tado | Amazon Kindle | 0 | 11-15-2012 06:51 PM |
"Enhanced Content" Went Missing After Update To iOS 5.1 & New Kindle App(?) | Batman Jr. | Apple Devices | 3 | 03-21-2012 11:40 PM |
Kindle for iOS updates with "Send to Kindle" and PDF support. | Nexutix | Apple Devices | 9 | 01-02-2012 12:37 PM |