Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-21-2011, 06:09 PM   #1
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
ibooks update and blank pages

I updated to the latest version of iBooks recently and suddenly noticed that pretty much all my books converted through Calibre now had blank pages between every "chapter". Digging around I found that if I removed the css property "page-break-before: always", that the books went back to displaying the way they had before the update.

Now I have a lot of epubs to edit by hand to make them display as before but for new conversions, is there a way to tell Calibre to not use or set that property to a different value?

Thanks.
adv_dp_fan is offline   Reply With Quote
Old 02-21-2011, 09:59 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,863
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by adv_dp_fan View Post
Digging around I found that if I removed the css property "page-break-before: always", that the books went back to displaying the way they had before the update.

Now I have a lot of epubs to edit by hand to make them display as before but for new conversions, is there a way to tell Calibre to not use or set that property to a different value?
Calibre only does what it's told. If that code wasn't in the original source file then perhaps you have Preferences - Common Options - Structure detection - Chapter mark set to pagebreak.

Maybe someone else can tell you if there is a easier way to remove this from your books.

Good Luck.
DoctorOhh is offline   Reply With Quote
Advert
Old 02-21-2011, 10:13 PM   #3
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
Thank you! That is exactly what I needed to know. What option to turn off in Calibre. I assume then to get the old display style in iBooks I would want to set that to "None". It must be that setting as these are books I scan and created myself and don't have anything like that before I convert to epub in Calibre.

Seems iBooks either ignored that property in the past or they broke the handling of it with the latest release. Just noticed I'm not the only one having issues with it.

Don't mind going back and fixing all the old ones, just wanted to avoid it going forward.
adv_dp_fan is offline   Reply With Quote
Old 02-22-2011, 09:18 PM   #4
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
Ok I have tried playing with that setting and Calibre still adds the property "page-break-before: always" to the files it is converting to epub. I am converting html files and have check that the property is not anywhere in there before the convert.

Does anyone know if it is possible to tell Calibre to not add that property when it converts?
adv_dp_fan is offline   Reply With Quote
Old 02-22-2011, 10:29 PM   #5
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,863
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by adv_dp_fan View Post
Ok I have tried playing with that setting and Calibre still adds the property "page-break-before: always" to the files it is converting to epub. I am converting html files and have check that the property is not anywhere in there before the convert.
In your test are you re-adding the html to an existing book record that you have previously converted and are now trying to fix? If you are read this post.

Simply changing the Chapter mark to None and removing any expression the Insert pagebreaks before Window (see attached) in the main Preferences area isn't enough. Calibre remembers old conversions settings.
Attached Thumbnails
Click image for larger version

Name:	pagebreaks.jpg
Views:	709
Size:	173.8 KB
ID:	67163  

Last edited by DoctorOhh; 02-22-2011 at 10:49 PM.
DoctorOhh is offline   Reply With Quote
Advert
Old 02-23-2011, 11:19 PM   #6
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
Yes, it is set exactly as in your image. These are not re-converted epubs. They're html files from books I scan myself, load into Calibre, edit my metadata and add a cover and then convert to epub.

The resulting CSS file has the "page-break-before: always" set in the .calibre style.

Didn't use to be an issue, just that iBooks was either ignoring it before or broke how they handled it as the latest update is putting blank pages before everything now.

For the time being I'm having to go back after the convert and hand remove that from the CSS to get the book to display correctly.

*shakes fist at Apple*
adv_dp_fan is offline   Reply With Quote
Old 02-24-2011, 03:07 AM   #7
netman49
Publisher
netman49 began at the beginning.
 
netman49's Avatar
 
Posts: 26
Karma: 10
Join Date: Jan 2009
Location: The Netherlands
Device: Cybook Gen3, Sony PRS-650, iPod Touch, iPad
Update of iBooks produces blank pages in Calibre ePub eBooks

Hi All,

I discovered the same problem after updating to the latest version of iBooks on my iPad.

All the ePub books that I've generated from Calibre now have a blank page before every chapter and the index links to a blank page instead of the page it points to.

The big question is, does Apple not conform to the standards or does Calibre generate an incorrect setting?

The strange thing is that my ePub books still display correct in Adobe Digital Edition on my Mac.

Hopefully we'll find the cause, for this must be something many Calibre users will run into.
netman49 is offline   Reply With Quote
Old 02-24-2011, 09:55 AM   #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,904
Karma: 22666668
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
While I dont use ibooks so I can't comment with any certainty, I'd guess this is caused by having a css page-break-before:always at the start of an individual html file inside the epub.

After the update iBooks is breaking the page at the start of the new html file *and* adding another page break because of the css. Which is silly. While I doubt this particular wrinkle is covered by the standards, iBooks' behavior is not backward compatible with itself or with Digital Editions, the only other epub reading software that honors page-break-before.

So report the problem to Apple and hopefully they will fix it.
kovidgoyal is offline   Reply With Quote
Old 02-24-2011, 12:11 PM   #9
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
I do use it and I am certain that Apple has messed up the page-break-before:always property. And I have reported and hope they fix it at some point, the more people who report it the more likely they will.

So not pointing a finger at Calibre, just asking if there is someway to keep it from adding that property when it creates an epub. So far it appears that there isn't and I'm just hand editing each file to remove that property after I create it.
adv_dp_fan is offline   Reply With Quote
Old 02-24-2011, 12:17 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,904
Karma: 22666668
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I added code to calibre to remove unnecessary CSS page-break properties. Should fix this if it is indeed the cause of the problem. Will be in next release.
kovidgoyal is offline   Reply With Quote
Old 02-24-2011, 12:19 PM   #11
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
Fantastic, thanks! I look forward to the next release.

And thanks for a fantastic program as well. Your work is greatly appreciated.
adv_dp_fan is offline   Reply With Quote
Old 02-25-2011, 02:40 AM   #12
netman49
Publisher
netman49 began at the beginning.
 
netman49's Avatar
 
Posts: 26
Karma: 10
Join Date: Jan 2009
Location: The Netherlands
Device: Cybook Gen3, Sony PRS-650, iPod Touch, iPad
Hi Kovid,

Thanks for your reaction and thanks for Calibre!
In connection with this issue, what are the preferred settings in the "Structure Detection" conversion settings? (see attached screenprint)

Gert
Attached Thumbnails
Click image for larger version

Name:	Schermafbeelding 2011-02-25 om 08.36.41.png
Views:	590
Size:	90.4 KB
ID:	67327  
netman49 is offline   Reply With Quote
Old 02-25-2011, 11:34 PM   #13
adv_dp_fan
Zealot
adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!adv_dp_fan will blow your mind, man!
 
Posts: 103
Karma: 57138
Join Date: May 2010
Device: Sony 505, iPad 1 & 3, Galaxy Note 8.1
Today I was able to get my hands on a copy of the iBookstore Asset Guide which gives lots of little details about creating epubs for the iBookstore. In it I learned that yes, they did just start to implement the "page-break-before" and the "page-break-after" properties with this last release. Appears that before they ignored them.

It seems that if you have that as part of an element that starts a new page, say a new xhtml file, then you get the page break from the element AND a forced page break (assuming "page-break-before: always") and thus a blank page at the start of each chapter.

I experimented with it a little and a new book I was working on and discovered two fixes, either remove the "page-break-before" property OR change it from "always" to "auto". Setting it to auto seems to prevent iBooks from placing the extra page-break and thus the blank page.

Hope this info is helpful to others besides me.
adv_dp_fan is offline   Reply With Quote
Old 02-26-2011, 06:02 AM   #14
netman49
Publisher
netman49 began at the beginning.
 
netman49's Avatar
 
Posts: 26
Karma: 10
Join Date: Jan 2009
Location: The Netherlands
Device: Cybook Gen3, Sony PRS-650, iPod Touch, iPad
Thanks for the tips!
Calibre has now come with an upgrade (7.47).
The following line is now left out the CSS file:

page-break-before: always;

I've tested it on my iPad and it works fine now. No more blank pages and the index points to the correct page.

The only thing I still wonder about is the effect of the XPath settings in the "Structure Detection" section of the conversion settings.
Do those settings have any effect?

Gert

Last edited by netman49; 02-26-2011 at 06:42 AM.
netman49 is offline   Reply With Quote
Old 02-26-2011, 08:16 AM   #15
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
Quote:
Originally Posted by netman49 View Post
Thanks for the tips!
Calibre has now come with an upgrade (7.47).
The following line is now left out the CSS file:

page-break-before: always;

I've tested it on my iPad and it works fine now. No more blank pages and the index points to the correct page.

The only thing I still wonder about is the effect of the XPath settings in the "Structure Detection" section of the conversion settings.
Do those settings have any effect?

Gert
They still do, because that's how Calibre knows where to split the epub into multiple chapters/flows. i.e. structure detection still inserts page breaks.

The change in the new release is that after splitting the page-breaks are removed, since they are then superfluous anyway.
ldolse is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Blank Pages in iBook WyattsTorch Workshop 2 03-11-2011 10:16 PM
Troubleshooting one after another blank pages monsterbadgog Amazon Kindle 0 02-20-2011 04:02 PM
Extra blank pages Paddlin Workshop 4 12-17-2010 11:40 AM
Blank pages with iPad timbgray Calibre 3 05-04-2010 09:43 PM
Blank pages JSWolf Calibre 4 11-29-2008 01:22 PM


All times are GMT -4. The time now is 08:03 PM.


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