Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Apple Devices

Notices

Reply
 
Thread Tools Search this Thread
Old 06-16-2021, 01:50 PM   #1
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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:
p {
margin: 0;
text-align: justify;
text-indent: 1.5em;
line-height: 125%;
}
Any solution to this? Thanks in advance.
rfog is offline   Reply With Quote
Old 06-16-2021, 03:00 PM   #2
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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.
rfog is offline   Reply With Quote
Advert
Old 06-16-2021, 03:34 PM   #3
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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.
rfog is offline   Reply With Quote
Old 06-16-2021, 03:35 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,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?
jhowell is offline   Reply With Quote
Old 06-16-2021, 03:39 PM   #5
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
Quote:
Originally Posted by jhowell View Post
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?
The problem, AFAIK, is present in at least the more than 90 000 ePubs I have. And yes, EPUBcheck returns no error.

I produce it with Calibre.

And sorry, no, I cannot sample a non-copyrighted book. :-(

I will continue with my fight.
rfog is offline   Reply With Quote
Advert
Old 06-16-2021, 06:17 PM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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.
JSWolf is offline   Reply With Quote
Old 06-17-2021, 02:07 AM   #7
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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.
Attached Thumbnails
Click image for larger version

Name:	Page1.PNG
Views:	211
Size:	795.3 KB
ID:	187721   Click image for larger version

Name:	Page2.PNG
Views:	200
Size:	199.3 KB
ID:	187722   Click image for larger version

Name:	Page3.jpg
Views:	210
Size:	376.9 KB
ID:	187723  
Attached Files
File Type: epub Scrambled 1 - Scrambled.epub (227.2 KB, 207 views)
File Type: mobi Scrambled 1 - Scrambled.mobi (500.2 KB, 194 views)
rfog is offline   Reply With Quote
Old 06-17-2021, 07:31 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,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.
jhowell is offline   Reply With Quote
Old 06-18-2021, 02:11 AM   #9
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
Posts: 694
Karma: 2383012
Join Date: Aug 2007
Location: Schiedam (The Netherlands)
Device: Lots of eInk devices and iOS stuff
Quote:
Originally Posted by jhowell View Post
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.
Wow! Impressive explanation. Thank you very much!!!

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.
rfog is offline   Reply With Quote
Old 06-18-2021, 02:42 AM   #10
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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.
Attached Files
File Type: txt rules.txt (167 Bytes, 194 views)

Last edited by rfog; 06-18-2021 at 02:57 AM.
rfog is offline   Reply With Quote
Old 06-18-2021, 09:08 AM   #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,557
Karma: 84810789
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
Quote:
Originally Posted by rfog View Post
Wow! Impressive explanation. Thank you very much!!!
I enjoy looking into odd problems like this.

Quote:
Originally Posted by rfog View Post
BTW, do someone how to file a bug to Amazon? I found nothing in their website.
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.
jhowell is offline   Reply With Quote
Old 06-22-2021, 07:10 AM   #12
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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).
rfog is offline   Reply With Quote
Old 06-22-2021, 12:43 PM   #13
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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.
rfog is offline   Reply With Quote
Old 06-22-2021, 03:56 PM   #14
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,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.
jhowell is offline   Reply With Quote
Old 06-23-2021, 03:05 AM   #15
rfog
Guru
rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.rfog ought to be getting tired of karma fortunes by now.
 
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.

rfog is offline   Reply With Quote
Reply


Forum Jump

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


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


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