05-30-2009, 01:13 AM | #1 |
Zealot
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? |
05-30-2009, 01:26 AM | #2 |
You kids get off my lawn!
Posts: 4,220
Karma: 73492664
Join Date: Aug 2007
Location: Columbus, Ohio
Device: Oasis 2 and Libra H2O and half a dozen older models I can't let go of
|
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. |
Advert | |
|
05-30-2009, 01:53 AM | #3 | |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
Quote:
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. |
|
05-30-2009, 03:59 AM | #4 | |
Wizard
Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
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. Last edited by itimpi; 05-30-2009 at 04:06 AM. |
|
05-30-2009, 02:13 PM | #5 | |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
Quote:
|
|
Advert | |
|
05-30-2009, 02:25 PM | #6 |
Wizard
Posts: 4,553
Karma: 950151
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.
|
05-30-2009, 02:38 PM | #7 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
I don't see what's causing it in the HTML.
|
05-30-2009, 07:22 PM | #8 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
Any other ideas? If it helps, I attached the file.
|
05-30-2009, 11:28 PM | #9 |
Wizard
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. Last edited by ldolse; 05-31-2009 at 12:49 AM. |
05-31-2009, 12:38 AM | #10 |
Guru
Posts: 644
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. |
05-31-2009, 08:44 AM | #11 | |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
Quote:
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 09:10 AM. |
|
05-31-2009, 10:57 AM | #12 |
Resident Curmudgeon
Posts: 75,901
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It is uploaded. It's inside the ePub file. The epub file is just a ZIP file.
|
05-31-2009, 11:40 AM | #13 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
|
05-31-2009, 11:41 AM | #14 |
Zealot
Posts: 144
Karma: 10
Join Date: May 2009
Device: none
|
Nvm, I think I got it. I had to open the EPUB with WinRar.
|
05-31-2009, 11:53 AM | #15 |
zeldinha zippy zeldissima
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
|
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.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Page breaks in ebooks, Yes or No? | nomesque | General Discussions | 30 | 06-12-2010 06:43 AM |
Problem with --page-breaks-before | pepak | Calibre | 5 | 10-24-2009 04:50 PM |
Page breaks not working | EnsignRicki | Calibre | 0 | 06-26-2009 11:47 AM |
losing page breaks | rholscher | Calibre | 8 | 04-16-2009 09:44 AM |
Page breaks in Plucker? | K12 Handhelds | Reading and Management | 2 | 02-19-2005 03:05 PM |