03-03-2019, 07:43 AM | #1 |
Member
Posts: 17
Karma: 10
Join Date: Apr 2014
Location: Brazil
Device: PW1, PW3
|
AZW3 Page-Break didn't work
Hello guys!
I've researched a lot and tried so many ways, but I didn't find a way to use the CSS "page-break-before: always" property in a book in AZW3 format. Does anyone knows if there is some limitation in AZW3 with that? ...my intention was to put a pageBreak() before each subchapter. The main chapters are already splitted in diferent .html files. |
03-04-2019, 09:13 PM | #2 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
How are you creating the azw3 file?
Do you begin with an epub, and convert? If you do that, and convert with kindlegen, or "Kindle Previewer for PC" which uses kindlegen, or convert with Calibre, I think the page-break-before should work. I have converted epubs that way, and in the Kindle Previewer the page break does work. But I do not have a Kindle device to test it on. Is your chapter wrapped in a <div> that has page-break-inside: avoid? Last edited by GrannyGrump; 03-04-2019 at 09:16 PM. |
Advert | |
|
03-05-2019, 03:22 AM | #3 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
|
|
03-06-2019, 02:56 PM | #4 |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
|
03-10-2019, 09:16 PM | #5 |
Well trained by Cats
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Me too
If it is not working, then there is a code (or conflicting code) problem. <p class="Style1 Style2"> Style1 putith, Style2 taketh back While it is valid to code that way, I prefer a single complete style. Way easier to troubleshoot |
Advert | |
|
03-11-2019, 06:38 AM | #6 | |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
It would help if you cited the CSS and the HTML that uses it. e.g. .mbp_pagebreak {page-break-after: always; margin: 0; display: block} Note this is page-break -after. I think that is more reliable and the way mobis are usually coded. invoked in a stand-alone line like <div class="mbp_pagebreak"></div> The Calibre viewer (ebook-viewer.exe) is useful to inspect mobi and AZW. It's not a perfect previewer, but lets you select and "Inspect" text to see the underlying code and its interactions and change it to see the results, so you can work out if some other code has negated what you wanted. |
|
03-11-2019, 10:24 PM | #7 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
I just remembered when I had a problem with page-break-before: always--- it would not work in EPUB.
If the page-break was preceded by <hr/> (horizontal rule), it failed --- it needed to have TEXT preceding it. see this thread: https://www.mobileread.com/forums/sh...d.php?t=270007 Maybe the OP is having a similar glitch? |
04-10-2020, 09:56 AM | #8 | |
Junior Member
Posts: 1
Karma: 10
Join Date: Apr 2020
Device: Kindle Paperwhite
|
Quote:
Code:
page-break-after: always; Simply saving and copying the azw3 on the kindle I did not get the desired result (even if in the calibre viewer I got the page-break as expected). So investigating I tried to reopen the reconverted AZW3 and I noticed that the html file was divided at the points where I wanted the page-break (perhaps in this way the kindle correctly detects the page-break). In the book before the conversion I had ~ 80 html files and in the converted one ~ 140 html files. |
|
11-26-2021, 10:45 AM | #9 | |
Casual Member
Posts: 5
Karma: 10
Join Date: Mar 2016
Location: UK
Device: Kindle paperwhite
|
Page-break-before
Quote:
New file results in a page break, no problem, I’ve been using new file to give a page break, but find the number of files messy, particularly if the section is short. Does this mean everyone claiming page-break-before works are wrong and “something” is just using the page-break-before to generate a new file |
|
11-26-2021, 12:47 PM | #10 |
the rook, bossing Never.
Posts: 11,157
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
All my new pages seem to start new files. Seems to be the only thing that works on KF7.
Long ago KDP told me to switch from docx to epub2 when the page breaks in KF7 and AZW3 (KF8) downloads vanished. That solved the problem as long as each page break was a new file. It doesn't matter how many files it makes as they are all in an outer "wrapper" anyway, a simple Zip for epub actually, so there is no file system fragmentation. The entire collection of "files" for mobi, azw3 or epub is one physical file. |
11-26-2021, 05:22 PM | #11 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
how are you deploying page-break-before:always? Hitch |
|
11-26-2021, 07:10 PM | #12 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
page-break-before:always is supported by the Kindle platform. However there can be problems if you use calibre.
Enhanced Typesetting (KFX format) handles it by splitting the content into a new section (the KFX equivalent of a new HTML file) at that point. Conversion using Amazon's kindlegen adds <mbp:pagebreak/> in MOBI7 and <div data-AmznPageBreak="always"/> in KF8 to make the page break actually function. Conversion using calibre handles page breaks slightly differently. Calibre will change page-break-before:always into a split of the HTML file in KF8. There is a bug in calibre's editor. It does not handle data-AmznPageBreak="always" properly resulting in broken page breaks if you attempt to edit a KF8 format book that was produced using kindlegen. Also you can't just add page-break-before:always into a KF8 book using calibre's editor since it does not convert it into data-AmznPageBreak="always" when you save the file. |
12-03-2021, 03:49 AM | #13 | |
Casual Member
Posts: 5
Karma: 10
Join Date: Mar 2016
Location: UK
Device: Kindle paperwhite
|
Quote:
I have had a light bulb moment, and as with all light bulb moments you can't believe how stupid you've been. What you see in calibre is not the azw3 as seen by calibre (doh!) Calibre converts the html you do see to azw3 format (obvious to me now) and calibre is not converting page-break- before (etc) into azw3 format page breaks. Calibre only converts new files to page breaks. Not wishing to criticise such an excellent product as calibre, but as this is html supported by kindle it ought to be converted appropriately. What I need is a different editor, but as this is my only gripe with calibre I won't bother, besides I can't find one at all let alone one that's better. |
|
12-04-2021, 12:00 PM | #14 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Why not just use Sigil to finish the book, if that's the only thing you're running into that bugs you? Use Sigil, get a final ePUB with your page-breaks in it and then drop that onto KP3. ??? Hitch |
|
12-05-2021, 12:49 AM | #15 | |
just an egg
Posts: 1,586
Karma: 4300000
Join Date: Mar 2015
Device: Kindle, iOS
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Do you use page-break-after and page-break-inside? | fluoresce | ePub | 14 | 05-24-2017 01:57 AM |
Does page-break-inside:avoid work in azw3 files? | AlexBell | Workshop | 4 | 04-21-2015 12:52 AM |
'page-break-before|after: always' doesnt work | sadhu44 | ePub | 18 | 06-18-2014 04:28 PM |
Why didn't this regex work right? | mrmikel | Editor | 1 | 04-12-2014 10:04 AM |
Troubleshooting Help,My kindle didn't work. Please | feiyangw | Amazon Kindle | 4 | 12-23-2011 04:49 AM |