Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-14-2011, 04:43 AM   #1
markdraper
Junior Member
markdraper began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2011
Device: iPad, Kindle
Page Breaks for Epub with InDesign

Hi this is the first time I am delving into epubs.

I have a book designed with indesign, with images that I wish to convert to a epub for use on ipads, iphones, kindle etc...

but I cannot get the pages to break in the right place. I know that epubs are just really a continuous stream of text and images, but they are just not displaying correctly on the mobile devices.

Can anyone help me with my problem.

Cheers
markdraper is offline   Reply With Quote
Advert
Old 07-14-2011, 06:05 AM   #2
coldplayplayer
Junior Member
coldplayplayer began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2011
Device: iPad / iPhone
I managed to get this working today. It may not be the correct way of doing it, but it did work for me.

After I've exported from InDesign as an ePub, I use Calibre to Tweak it. I edit my XHTML and CSS with Notepad++ on the PC or Text Wrangler on my MAC.

In the XHTML, at every point I want to force a page break, I insert the following code:
<h1></h1>


In my CSS for the template I add the following code:
h1{
page-break-before: always;
}

Unsure if page-break-before or page-break-after is the better option. I'm still a NewB when it comes to ePubs so no doubt one of the gurus out there has a better fix, but like I say it definitely worked for me today.
coldplayplayer is offline   Reply With Quote
Old 07-14-2011, 06:45 AM   #3
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,062
Karma: 9175645
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
It's better to use something like <div class="pagebreak"></div>, rather than <h1></h1>, which has implicit semantics.

Some readers discard empty divs, so it might be necessary to use <div class="pagebreak">&nbsp;</div>.
Jellby is offline   Reply With Quote
Old 07-14-2011, 12:11 PM   #4
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 10,594
Karma: 11012356
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2
Quote:
Originally Posted by coldplayplayer View Post
I managed to get this working today. It may not be the correct way of doing it, but it did work for me.

After I've exported from InDesign as an ePub, I use Calibre to Tweak it. I edit my XHTML and CSS with Notepad++ on the PC or Text Wrangler on my MAC.

In the XHTML, at every point I want to force a page break, I insert the following code:
<h1></h1>


In my CSS for the template I add the following code:
h1{
page-break-before: always;
}

Unsure if page-break-before or page-break-after is the better option. I'm still a NewB when it comes to ePubs so no doubt one of the gurus out there has a better fix, but like I say it definitely worked for me today.
page-break-before is fine. I have used this without problems on many eBooks and as I am not div happy I seldom use them. Others seem to use nothing else.

Dale
DaleDe is offline   Reply With Quote
Old 07-18-2011, 08:43 AM   #5
markdraper
Junior Member
markdraper began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2011
Device: iPad, Kindle
thanks for your input, but I am not very of-ay with html, css.

could someone explain in simple terms, sorry to be a pain.
markdraper is offline   Reply With Quote
Advert
Old 07-18-2011, 10:34 AM   #6
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 10,594
Karma: 11012356
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2
Quote:
Originally Posted by markdraper View Post
thanks for your input, but I am not very of-ay with html, css.

could someone explain in simple terms, sorry to be a pain.
This is why we have a wiki. Lots of terms explained.

Dale
DaleDe is offline   Reply With Quote
Old 07-18-2011, 11:49 PM   #7
eping
ePub Maker
eping began at the beginning.
 
eping's Avatar
 
Posts: 120
Karma: 16
Join Date: Dec 2009
Location: Mordor
Device: iPad,Kindle 3, Nook 2
The best way is HTML split .
All eReaders will start a new page with another HTML file,
aboves ways of using CSS will fail on iBooks(on iPad, iPhone)
eping is offline   Reply With Quote
Old 07-19-2011, 12:24 PM   #8
markdraper
Junior Member
markdraper began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2011
Device: iPad, Kindle
eping, I have looked for doing a html split, but all I can find is printer page breaks and it does not work on the epubs.
markdraper is offline   Reply With Quote
Old 07-19-2011, 12:29 PM   #9
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 10,594
Karma: 11012356
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2
Quote:
Originally Posted by markdraper View Post
eping, I have looked for doing a html split, but all I can find is printer page breaks and it does not work on the epubs.
If you have control over the CSS entries you can add the page break there and it will work.

Dale
DaleDe is offline   Reply With Quote
Old 07-19-2011, 11:26 PM   #10
eping
ePub Maker
eping began at the beginning.
 
eping's Avatar
 
Posts: 120
Karma: 16
Join Date: Dec 2009
Location: Mordor
Device: iPad,Kindle 3, Nook 2
You can split a big document into small documents(on chapter), then create a book with these documents.
This is a classic method for InDesign users.
eping is offline   Reply With Quote
Old 07-20-2011, 01:59 AM   #11
Chang
Connoisseur
Chang began at the beginning.
 
Posts: 79
Karma: 34
Join Date: Oct 2009
Device: none
Which InDesign version are you using? There are different ways to make page breaks in InDesign.

CS3 & CS4: Divide your .indd file into separate .indd files. Create book from your .indd files and export EPUB from the book. Each .indd file means page break.

CS5: You can use paragraph styles as page breaks. You can edit this from Layout -> Table of Contents Styles. Add the paragraph styles for TOC and make sure those are level one in TOC settings. Then in EPUB export settings you can choose to use your TOC setting and by selecting "Use First Level Entries as Chapter Breaks" it will chop your .indd file wherever there are level one TOC paragraph style.

CS5.5: Almost the same as above but you can select one paragraph style to make page breaks in the EPUB export settings.

No need to play with HTML to create page breaks.
Chang is offline   Reply With Quote
Old 07-20-2011, 05:51 AM   #12
markdraper
Junior Member
markdraper began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2011
Device: iPad, Kindle
I am using InDesign 5.5 as it was a good deal easier to do anchoring of images to places on the pages.
I'm sure I have tried that, let me have another go.

But is there a way to break the pages, if there is not text with a paragraph style?
markdraper is offline   Reply With Quote
Old 07-20-2011, 06:55 AM   #13
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,309
Karma: 115718815
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
I can't say anything about ID, since I don't use the program. However, a page break can always be forced. Either with a separate document or the attribute 'page-break-before-always'. Try to have each chapter in a separate XHTML document though, that will make things work better.
Toxaris is offline   Reply With Quote
Old 07-20-2011, 07:18 AM   #14
markdraper
Junior Member
markdraper began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jul 2011
Device: iPad, Kindle
I have tried that, but it didn't seem to work, should I paste a part of the code I want it to break at?

also, is it just something I paste into the html before the picture, or is there anything else I need to place in the head of the text?
markdraper is offline   Reply With Quote
Old 07-20-2011, 10:08 AM   #15
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Unfortunately, page-break-before won't work on the iPad, which may be why you're having problems. The best solution is to open the file in Sigil and split the book into different files wherever you want a pagebreak.

Alternatively, if you really have to avoid post-processing the exported file, it is possible to do it in InDesign using the method I outlined here.
charleski is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub to mobi loses page breaks stevent10993 Conversion 5 07-20-2011 12:43 AM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 01:23 PM
PDF to EPUB - page breaks pops1959 Calibre 0 01-13-2011 07:28 PM
Page breaks - PDF input to ePub output JoTH Calibre 9 11-18-2010 04:35 PM
Any way to force page breaks when converting HTML to EPUB Bierkonig Calibre 23 10-31-2009 01:51 PM


All times are GMT -4. The time now is 06:35 AM.


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