View Full Version : Page breaks lost after upload to iTunes Producer


dolphin dave
05-27-2012, 07:24 AM
I need the help of a epub to ibooks guru......

I have a lots of sections in my new epub 'Sporades Sailing pilot' which is now viewable in Ibooks. Its a guide type book and would be really difficult to cut it into hundreds of different xhtml pages to keep headings at the top of a new page. Most sections have a Heading <h4> then followed by an SVG map images, then some writing unerneath with another thumbnail jpeg floating around in the text.

Before i submitted the epub to Ibooks it showed fine in iphone and ipad and page breaks work on other platforms. However after uploading to Ibooks the page breaks have done their own thing! Now i am getting the Heading at the end of the previous page, if there is enough space underneath i get the SVG image, if not, that image starts at the top of another page, then the text and thumbnails. Its all a bit 'disjuncted' with white space.

- i was originally wrapping the <h4> heading using the <div class="header"> tag on the xhtml page with {'page-break-before always'} on the CSS stylesheet. However, after it was loaded onto ibooks this page break functionality was lost..... should i extend this div tag to include the first svg image to keep them togther?

or

- i have read that i your wrap the heading and everything else in that section in div tags with {display: inline-block} in the CSS that this forces the heading onto a new page? However will this work if the content of that section is spread over several screen pages?

or

- Or should i use <div style="page-break-before:always;"></div> directly on the xhtml page and forget about CSS stylesheet

or

- perhaps use individual commands at the head of each xhtml page like… <style type="text/css"> h4 {page-break-before: alway}></style>, to break before section headings?

or

- am i barking up the wrong tree

Basically i'm looking for a way to force page breaks that will work after processing on Itunes producer..........

slainte dave

Jellby
05-27-2012, 09:01 AM
Having something like this in your CSS stylesheet should be enough:

h4 { page-break-before: always; }

No need to add a wrapping <div> or anything. But of course, it depends on reading software obeying it.

dolphin dave
05-27-2012, 09:35 AM
Jellby,

Thanks for quick reply...

I have tried using a h4 { page-break-before: always; } on the CSS stylesheet without the <div> tags, but still get the section headings orphaned on the previous page. Dont get me wrong, it looks great when i test it on the iphone, ipad and on the browser but after have uploaded it, via itunes producer, it goes wonky and orphans appear.

I think am going to try the inline block command with the h4 { page-break-before: always; } in the CSS stylesheet, see if that works. Its only with ibooks that have this problem, page breaks working fine and looks great on kindle and digital editions....

still scratching my head....

dave

Jellby
05-27-2012, 11:20 AM
Can you see what is the result after your upload? I mean the code inside the (pseudo-)ePub, to see if the process changed anything.

Where are you trying the resulting ePub? In ibooks? Do we know if ibooks supports soft pagebreaks?

Toxaris
05-27-2012, 04:28 PM
If you place each header in a separate XHTML file, it will be on a new page anyway. A special DIV should not be necessary. It might be that iBooks doesn't support page-break-before. Have you tested you ePUB with ADE?