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-30-2009, 02:13 AM   #1
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Page breaks

For some HTML files, when I convert them to EPUB and view them on my Sony-505, the pages break strangely. For example, it'll start at page one, then when you hit "next page," it stays on page one, but at a different spot. Sometimes it'll split pages so that it says, for example, "2-3." This is annoying because sometimes the same text I already read will be present on the next page turn. Sometimes, as well, headings won't even show up - there is a big blank space where they should be - until I turn the page again.

How can I make it so that pages break on my ereader when it reaches the end of the screen, so that each new page is a whole page on the ereader, even if it is half a page in the original file?
enarchay is offline   Reply With Quote
Old 05-30-2009, 02:26 AM   #2
FizzyWater
You kids get off my lawn!
FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.FizzyWater ought to be getting tired of karma fortunes by now.
 
FizzyWater's Avatar
 
Posts: 3,073
Karma: 10090487
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Dell Axim, PRS350/650, Nook Glow, PB Touch Lux 623
As far as I understand it, the "page break" problem you're seeing is really just the way ePub books are designed. Unlike other ebook formats where the page count changes based on the size of the screen and the size of the font, ePub page counts are fixed. (I suspect they're based on a "normal" PDF-sized page, but I've never researched it).

So you get "page 1" for two or three page turns. You'll be on a page that's partly 2 and partly 3.
FizzyWater is offline   Reply With Quote
Old 05-30-2009, 02:53 AM   #3
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by FizzyWater View Post
As far as I understand it, the "page break" problem you're seeing is really just the way ePub books are designed. Unlike other ebook formats where the page count changes based on the size of the screen and the size of the font, ePub page counts are fixed. (I suspect they're based on a "normal" PDF-sized page, but I've never researched it).

So you get "page 1" for two or three page turns. You'll be on a page that's partly 2 and partly 3.
I guess I could convert to LRF, but they usually don't look as nice.

Most of the EPUBS I've created from HTML look fine. It's just this particular file. I wouldn't particularly mind the pages splitting as they do, but in this case it is preventing me from reading some text (the headings), or causing the same text I've already read to reappear on the next page.
enarchay is offline   Reply With Quote
Old 05-30-2009, 04:59 AM   #4
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,105
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
Quote:
Originally Posted by FizzyWater View Post
As far as I understand it, the "page break" problem you're seeing is really just the way ePub books are designed. Unlike other ebook formats where the page count changes based on the size of the screen and the size of the font, ePub page counts are fixed. (I suspect they're based on a "normal" PDF-sized page, but I've never researched it).

So you get "page 1" for two or three page turns. You'll be on a page that's partly 2 and partly 3.
The Epub ebook format (like most ebook formats) has no concept of fixed page numbers, and isntead expects text to be formatted in "re-flowable"format so that it can dynamically be adjusted to fit the display size and font size in use. The page size is is entirely a function of the reading software, and the current font sizes you are using. The number of pages will change if you decrease/increase the font size while reading. What ebook reading software/hardware are you using?

What I suspect you are seeing is the cases where the headers/footers are embedded in the main ebook text. This is common in (illegal) ebooks that have been scanned in and the OCR'ed. It will not happen in properly formatted eBooks.

Last edited by itimpi; 05-30-2009 at 05:06 AM.
itimpi is offline   Reply With Quote
Old 05-30-2009, 03:13 PM   #5
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
What I suspect you are seeing is the cases where the headers/footers are embedded in the main ebook text. This is common in (illegal) ebooks that have been scanned in and the OCR'ed. It will not happen in properly formatted eBooks.
I'm converting HTML - an article from an online encyclopedia - to EPUB. I keep getting the problem I describe above and I don't know how to fix it.
enarchay is offline   Reply With Quote
Old 05-30-2009, 03:25 PM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,105
Karma: 780247
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
You will have to look at the HTM to see why the page breaks are happening as you describe. It is not a limitation of ePub, but of the input html.
itimpi is offline   Reply With Quote
Old 05-30-2009, 03:38 PM   #7
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
I don't see what's causing it in the HTML.
enarchay is offline   Reply With Quote
Old 05-30-2009, 08:22 PM   #8
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Any other ideas? If it helps, I attached the file.
Attached Files
File Type: zip are mormons theists2.zip (17.2 KB, 89 views)
enarchay is offline   Reply With Quote
Old 05-31-2009, 12:28 AM   #9
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
The tags appeared to be in pretty bad shape. Note that epub requires xhtml, which requires every tag opened to be neatly closed to form proper xml. Calibre will attempt to convert html to xhtml, but that process is error prone and its' effectiveness is pretty dependent on the source material.

For this file, I did the following:
Replaced '<br><br>' with '</p><p>'
Cleaned up all the remaing single <br>, <p>, and </p> tags. There were a lot of places where a paragaph began with <p> but wasn't terminated with </p>, in many other cases there were many </p> tags where the preceding beginning of the paragraph was <br> instead of <p>.

The last issue, which I didn't notice until I sent the book to my reader, is that every paragraph immediately following an <h1> tag wasn't enclosed in <p></p> tags, which apparently makes it invisible on the reader.

Basically every paragraph should start with <p> and end with </p>.
<br> is not considered a good tag to use, but I believe if you just want a line break you can make it a self closing <br/> and that is acceptable for xhtml.

Seems to work fine with these changes on my Sony, but I didn't go through every page in detail.
Attached Files
File Type: epub are mormons theists - A.A. Howsepian.epub (22.4 KB, 102 views)

Last edited by ldolse; 05-31-2009 at 01:49 AM.
ldolse is offline   Reply With Quote
Old 05-31-2009, 01:38 AM   #10
Sabardeyn
Guru
Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.Sabardeyn ought to be getting tired of karma fortunes by now.
 
Sabardeyn's Avatar
 
Posts: 630
Karma: 1242364
Join Date: May 2009
Location: The Right Coast
Device: PC (Calibre), Nexus 7 2013 (Moon+ Pro), HTC HD2/Leo (Freda)
enarchay & ldolse,

Just wanted to say a quick thanks for bringing the error with using online html articles to light. Without seeing this topic I imagine I would encounter this very same error at some point. To me, this was equivalent to clipping an interesting news or magazine article out for later review. Since we're already using calibre for all our other e-reading and e-book needs, it is a natural assumption to handle it in the same manner.
Sabardeyn is offline   Reply With Quote
Old 05-31-2009, 09:44 AM   #11
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by ldolse View Post
The tags appeared to be in pretty bad shape. Note that epub requires xhtml, which requires every tag opened to be neatly closed to form proper xml. Calibre will attempt to convert html to xhtml, but that process is error prone and its' effectiveness is pretty dependent on the source material.

For this file, I did the following:
Replaced '<br><br>' with '</p><p>'
Cleaned up all the remaing single <br>, <p>, and </p> tags. There were a lot of places where a paragaph began with <p> but wasn't terminated with </p>, in many other cases there were many </p> tags where the preceding beginning of the paragraph was <br> instead of <p>.

The last issue, which I didn't notice until I sent the book to my reader, is that every paragraph immediately following an <h1> tag wasn't enclosed in <p></p> tags, which apparently makes it invisible on the reader.

Basically every paragraph should start with <p> and end with </p>.
<br> is not considered a good tag to use, but I believe if you just want a line break you can make it a self closing <br/> and that is acceptable for xhtml.

Seems to work fine with these changes on my Sony, but I didn't go through every page in detail.
Thanks. Funny how the reader doesn't recognize <h1> tags outside of <p> tags.

I didn't think the HTML was that bad, but I had copied it from the source of a website, and I didn't feel like going through the whole thing.

Hey, do you think you could upload the HTML file for me?

Thanks for the help.

Last edited by enarchay; 05-31-2009 at 10:10 AM.
enarchay is offline   Reply With Quote
Old 05-31-2009, 11:57 AM   #12
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 38,528
Karma: 19637653
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 1, iPhone 5
It is uploaded. It's inside the ePub file. The epub file is just a ZIP file.
JSWolf is offline   Reply With Quote
Old 05-31-2009, 12:40 PM   #13
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Quote:
Originally Posted by JSWolf View Post
It is uploaded. It's inside the ePub file. The epub file is just a ZIP file.
It doesn't download for me as a ZIP file.
enarchay is offline   Reply With Quote
Old 05-31-2009, 12:41 PM   #14
enarchay
Zealot
enarchay began at the beginning.
 
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
Nvm, I think I got it. I had to open the EPUB with WinRar.
enarchay is offline   Reply With Quote
Old 05-31-2009, 12:53 PM   #15
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,828
Karma: 908606
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
Quote:
Originally Posted by enarchay View Post
Nvm, I think I got it. I had to open the EPUB with WinRar.
yes, as mentioned, an epub file is just a zip container, with xhtml etc. inside. to open it, either right click "open with" and select winzip, winrar, etc., or manually change the extension to .zip and double click.
zelda_pinwheel 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
Page breaks in ebooks, Yes or No? nomesque General Discussions 30 06-12-2010 07:43 AM
Problem with --page-breaks-before pepak Calibre 5 10-24-2009 05:50 PM
Page breaks not working EnsignRicki Calibre 0 06-26-2009 12:47 PM
losing page breaks rholscher Calibre 8 04-16-2009 10:44 AM
Page breaks in Plucker? K12 Handhelds Reading and Management 2 02-19-2005 04:05 PM


All times are GMT -4. The time now is 01:59 AM.


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