12-18-2022, 01:49 AM | #1 |
Enthusiast
Posts: 30
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
Page-breaks and (possible) bug in Android Webview
Hello everyone
(and apologies for my bad English… not my native language). I've been experimenting quite a bit with page-breaks lately and have noticed a few issues: 1. In several places (including a recent post by RbnJrg) I've read that it should be used Code:
page-break-before: always; break-before: column; Although there are sites that insist that the second should be break-before: always/all, these don't work (or have stopped doing so). The other one that does have a little support is break-before: page… BUT, as always, there are problems: Google Play Books, Colibrio Reader and Pocketbook don't break with this combination, they only do so if the lines' order is reversed. Although then Aldiko (Next), Lithium, Reasily and others don't do it. I have done many many tests (even with the obsolete commands), giving the results I detail in the table. [attached: 'break tests' epub and table pdf (The "S" is for "SÍ" = "YES")]. Spoiler:
2. I have also noticed some odd behavior in Android Webview based apps (from v102 onwards), such as Lithium/Reasily/Infinity… If break-before:column is used, the paragraphs are broken down into multiple pages. [attached: screenshots] So, looking to fix issues 1 and 2: Rather: Code:
.nota { page-break-before: always; break-before: column; } Code:
.nota { page-break-before: always; } @supports (break-before: column) { .nota { page-break-before: auto; break-before: column; break-inside: avoid-column; } } [attached: example 'simple notes' epub2 (epub3 has the same behavior). If an app uses the second key, the text will be green as a visual clue.] It has the advantage of a) work on those that don't read @supports (like Google Play Books and ADE… unfortunately, not Colibrio or Pocketbook) b) avoid the Webview 102+ bug (and a double page jump in Lithium). What do you think? Do you see it as a reliable solution? Could it cause problems in the long run (if they ever fix the bug)? TIA! . |
12-18-2022, 05:58 AM | #2 |
the rook, bossing Never.
Posts: 10,794
Karma: 83992591
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
Well, we always start a new file when a page break is needed and totally avoid columns, so likely none of our ebooks are affected.
I can see there is a problem if you absolutely must have columns. I do check ebooks on Lithium, Pocketbook, Aldiko Basic and Google Play Books all on Android. |
Advert | |
|
12-19-2022, 04:51 AM | #3 |
Wizard
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
The properties to be used are:
Code:
.breakBefore { page-break-before: always; break-before: column; -webkit-column-break-before: always; break-inside: avoid-column; -webkit-column-break-inside: avoid; } PocketBook employs RMSDK (ADE Legacy) to display epub2 ebooks and Webkit to display epub3. It must be using and ancient version of webkit because otherwise it should honor page-breaks under epub3. Let's hope that a new version of the app updates the engine. Last edited by RbnJrg; 12-19-2022 at 04:56 AM. |
12-19-2022, 04:54 AM | #4 |
Wizard
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
12-19-2022, 06:43 AM | #5 |
the rook, bossing Never.
Posts: 10,794
Karma: 83992591
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I only use Aldiko basic on the prehistoric 4.3″ Android 4 phone. I did use Bluefire for a while on that.
Actual checking is done with plugins etc in Calibre. The Android viewing is really just to make sure images are sane on small to large screens. Last edited by Quoth; 12-19-2022 at 06:47 AM. |
Advert | |
|
12-19-2022, 10:35 AM | #6 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
However, you seem, submitter, to be trying to force breaks mid-paragraph? Is that right? Doesn't that wreak havoc all by itself, never mind what reader supports which set of commands? Hitch |
|
12-19-2022, 11:44 PM | #7 | ||
Enthusiast
Posts: 30
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
Quote:
Quoth, the books we work on are mostly fiction/educational: some may have hundreds of small footnotes. It seems more efficient to have them grouped in a single xhtml (or a few, when they are over 300k) at the end. Hitch, I must have expressed myself badly. It is Android Webview itself (v102 and following, used by Lithium/Reasily) that breaks paragraphs into multiple pages (as seen in the screenshots). The proposed code tries to avoid that, precisely. |
||
12-20-2022, 12:08 AM | #8 | ||
Enthusiast
Posts: 30
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
|
Quote:
—Google Play Books (not in your list) is almost a must for our student audience, often with Android tablets/phones, who prefer its notes and multi-device sync capabilities. Sadly, your recommended order prevents the page jump from working. My idea of using @supports is to "hide" that part, so GPB only uses the first page-break. —In the apps I have been able to test it seems redundant to use -webkit-column-break in addition to the canonical break (see PDF table). Please can you point me which applications/readers require the former as mandatory? Quote:
I don't have access to a real PB reader, so I don't know how these behave now… Gracias de nuevo, amigo! |
||
12-20-2022, 08:23 AM | #9 | |
Bookmaker & Cat Slave
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Moreover, the apps are constantly updated, so something that's correct on Monday may not be on Tuesday and so on. At my shop, we tell folks that we'll guarantee the work on the major physical devices--Kindle, Nook, iOS Books app, Kobo--and NOT on software readers, for that very reason. I was once driven nearly bonkers by someone who wanted something to display a certain way in something like MoonReader and I put paid to that after that book. But, good luck with it. Hitch |
|
12-20-2022, 09:55 AM | #10 | ||||
Wizard
Posts: 1,528
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
The "bug" you were watching under Reasily, Lithium, etc. is due those apps "understand" (because of the properties break-before: column and -webkit-column-break-before: always) that one is working with multi-columns and so, they apply the default value for the property column-fill, that is, "column-fill: balance". Quote:
Quote:
Quote:
|
||||
12-20-2022, 10:12 AM | #11 |
the rook, bossing Never.
Posts: 10,794
Karma: 83992591
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I feel if I needed epub3 I'd do an app. We only use epub2 and let Amazon convert the epub2 to whatever.
It's better than mobi and epub2 works on everything (inc Amazon who has 92%+ of English and prefers epub upload). |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Paragraph breaks become page breaks when converting to mobi | Allreader | Conversion | 6 | 07-19-2021 01:08 AM |
Help with assigning correct page breaks and page numbers to a textbook [converting fr | cateroseg | Calibre | 0 | 02-14-2018 10:32 PM |
Android Kindle 4.1 breaks further page syncing? | Oletros | Amazon Kindle | 43 | 09-13-2013 01:40 AM |
epub to mobi h1 page breaks not starting on new page | wannabee | Conversion | 4 | 08-02-2011 12:46 AM |
Adding page breaks in Calibre breaks ePubcheck validation | bookraft | Conversion | 16 | 03-01-2011 01:23 PM |