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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2009, 03:21 PM   #1
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
Mobi to epub page break

Hi all!

First post here!

I'm converting my ebooks from mobi (html converted with mobi creator) to epub using calibre (while waiting for the new cybook firmware :-))

If I have a chapter title followed by a pagebreak, and then a line on its own, in the resulting epub the page breaks after that line as well, so I have a page with just a single line in it.

If I add an "html page break" to the code used for creating the mobi the epub will look fine, but the converted-from-mobi toc won't work anymore... :-(

Does anyone know a workaround for this?

Thanks!

Paolo
mr.ninja13 is offline   Reply With Quote
Old 05-09-2009, 03:30 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Set chapter decoration to none in the conversion options
kovidgoyal is offline   Reply With Quote
Advert
Old 05-09-2009, 04:03 PM   #3
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
Hi Kovid, that was a really quick answer! Thank you!

Unfortunately that didn't seem to work...

My structure is more or less like this:

<h1>chapter name</h1>
<mobi page break>
Text of the book, blah blah.</br></br>

I disabled the chapter detection and mark in calibre, but the page still breaks after the </br> code.

Paolo
mr.ninja13 is offline   Reply With Quote
Old 05-09-2009, 06:39 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why do you have <mobi page break> in your code?
kovidgoyal is offline   Reply With Quote
Old 05-10-2009, 10:38 AM   #5
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
Sorry, I meant <mbp:pagebreak/>
mr.ninja13 is offline   Reply With Quote
Advert
Old 05-10-2009, 01:19 PM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Don't use <mbpagenreak/> Use <div style="page-break-after:always"/> instead. calibre will automatically create te neccessary mobipocket tags
kovidgoyal is offline   Reply With Quote
Old 05-10-2009, 01:56 PM   #7
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by kovidgoyal View Post
Don't use <mbpagenreak/> Use <div style="page-break-after:always"/> instead. calibre will automatically create te neccessary mobipocket tags
But wasn't this thread about converting from mobi to ePub?
tompe is offline   Reply With Quote
Old 05-10-2009, 02:27 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by tompe View Post
But wasn't this thread about converting from mobi to ePub?
I got the impression that the OP was inserting the tags by hand. If he's converting using calibre, the mbpagebreak tags will not be present in the generated HTML
kovidgoyal is offline   Reply With Quote
Old 05-10-2009, 04:13 PM   #9
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
I insert tags by hand, but then I use the mobipocket creator to generate the prc.

I tried to replace the tags as you suggested and create the mobi with calibre, but when I converted it to epub the problem of the page break after the first line break was still there in (both converting the mobi to epub and converting the source html to epub).

Paolo
mr.ninja13 is offline   Reply With Quote
Old 05-10-2009, 04:23 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Can you attach a sample html file showing this behavior
kovidgoyal is offline   Reply With Quote
Old 05-10-2009, 06:47 PM   #11
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
Here you go (it's just the first 2 chapters).

Interestingly, if I use both the <mbp:pagebreak> and the <div style="page-break-after:always"/> in the html and create the prc with Mobipocket Creator then convert it to epub with calibre, the epub will look correct, but the TOC won't work correctly (most links will just send to the TOC index instead of the correct page).

Thanks, by the way!

Paolo
Attached Files
File Type: zip Beowulf.zip (2.7 KB, 295 views)
mr.ninja13 is offline   Reply With Quote
Old 05-10-2009, 08:14 PM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm confused, the epub file calibre generates from that html file is fine (apart from some spurious <pagebreak/> tags that come from the <mbpagebreak/> tags in the source? So what was the problem again?
kovidgoyal is offline   Reply With Quote
Old 05-11-2009, 08:30 AM   #13
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
The problem is that for some reason, I have an additional page break after the first line break of the text... I.e it appears like this in ADE:

---page break---
PRELUDE OF THE FOUNDER OF THE DANISH HOUSE
---page break---
LO, praise of the prowess of people-kings
---page break---
of spear-armed Danes, in days long sped...

The last page break shouldn't be there... And actually, in the calibre reader it'll look like this:

---page break---
PRELUDE OF THE FOUNDER OF THE DANISH HOUSE

LO, praise of the prowess of people-kings
---page break---
of spear-armed Danes, in days long sped...

The way it should be (and how it appears in the prc) is:


---page break---
PRELUDE OF THE FOUNDER OF THE DANISH HOUSE
---page break---
LO, praise of the prowess of people-king

of spear-armed Danes, in days long sped...

etc...

Paolo
mr.ninja13 is offline   Reply With Quote
Old 05-11-2009, 09:27 AM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,739
Karma: 22446736
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
i dont see those page breaks in my conversion. what conversion options are you using?
kovidgoyal is offline   Reply With Quote
Old 05-11-2009, 11:01 AM   #15
mr.ninja13
Member
mr.ninja13 began at the beginning.
 
Posts: 20
Karma: 10
Join Date: May 2009
Location: UK
Device: Cybook Gen3
That's strange...

I use all default settings "except chapter mark" set to "none" and "exclude first image" set to true.

If that can make a difference, I'm using XP and the latest version of Calibre...

Paolo
mr.ninja13 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
[Old Thread] epub -> mobi conversion; blank page after image joubert Calibre 10 03-07-2011 05:26 PM
Strange behavior converting from ODT to EPUB, lots of page-break superanima Calibre 0 01-25-2010 02:57 AM
EPUB=>Mobi: Start/open at cover page - how to? Skydog Calibre 6 10-16-2009 09:43 PM
epub - unwanted page break after image mrmikel Calibre 5 07-10-2009 07:35 AM
Page break before <b> flowoeB Calibre 14 04-12-2009 03:05 PM


All times are GMT -4. The time now is 10:30 PM.


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