Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2014, 04:36 PM   #1
AmandaM
Junior Member
AmandaM began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: Kindle, Kobo, Nook
Kobo kepub Problems

Greetings All

I have created an ePub which works perfectly on desktop readers and correctly validates. If I copy this ePub onto my Kobo it also works perfectly. However, if rename this ePub to book.kepub.epub and then copy it onto my Kobo the css seems to get ignored. For example:

CSS:

Code:
p.CenterText {
text-indent:0;
text-align:center;
}

div.pagebreak {
page-break-after: always;
}
Body Code:

Code:
p class="CenterText">This text is centered</p>
div class="pagebreak"></div>
p class="CenterText">More Centered Text</p>
The above will be ignored and the text will be left aligned and on the same page.


I first discovered this problem after I submitted my perfectly functioning ePub to kobo, the resulting book after it became available for sale showed the problem.

Just to reiterate, this works perfectly when it is a straight ePub but not when a kePub. I can post real examples of my code if it helps.

Hope somebody can help

Many Thanks
Amanda
AmandaM is offline   Reply With Quote
Old 08-24-2014, 05:11 PM   #2
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: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
That's because it is an ePub and not a kepub. There's nothing wrong with it. There is a Calibre plugin that might help. have a look in the plugins section of the Calibre forum.
JSWolf is online now   Reply With Quote
Advert
Old 08-24-2014, 05:37 PM   #3
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by JSWolf View Post
That's because it is an ePub and not a kepub. There's nothing wrong with it. There is a Calibre plugin that might help. have a look in the plugins section of the Calibre forum.
If its a valid ePub then in theory it should work as-is as a kEpub. Any chance you could just upload a test eBook that demonstrates this so we can all be testing with the exact same content?

All that the kEpub conversion does is to wrap sentences (and maybe other bits) in <span> tags, and I believe this is done to support their bookmarking.

You can see the specs for their support at https://github.com/kobolabs/epub-spec
PeterT is offline   Reply With Quote
Old 08-24-2014, 05:58 PM   #4
AmandaM
Junior Member
AmandaM began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: Kindle, Kobo, Nook
Thanks for your replies thus far.

I will upload a test epub tomorrow. I don't think that this is a simple conversion problem because the actual book that was available on the Kobo store did not work correctly.

Amanda
AmandaM is offline   Reply With Quote
Old 08-24-2014, 06:02 PM   #5
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
I should clarify that I meant the calibre plugins conversion is just the adding of span's.
PeterT is offline   Reply With Quote
Advert
Old 08-24-2014, 10:41 PM   #6
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: 79,722
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I just noticed that the div is missing a <. That would cause a problem.
JSWolf is online now   Reply With Quote
Old 08-24-2014, 10:46 PM   #7
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
@JSWolf: As are the p's missing a <. I *THINK* that is just a cut and paste error, and it's one reason I'd far rather see a test book than a code paste.
PeterT is offline   Reply With Quote
Old 08-25-2014, 08:42 AM   #8
AmandaM
Junior Member
AmandaM began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: Kindle, Kobo, Nook
Quote:
Originally Posted by JSWolf View Post
I just noticed that the div is missing a <. That would cause a problem.

Indeed, this was just a typo on the forum... Sorry!
AmandaM is offline   Reply With Quote
Old 08-25-2014, 08:46 AM   #9
AmandaM
Junior Member
AmandaM began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: Kindle, Kobo, Nook
I have put together and attached a test ePub which demonstrates my problem.

This ePub validates without problem and when I upload it to my Kobo it works as expected. However, if I rename it to *.kepub.epub and then upload it to my Kobo the CSS seems to be ignored.

I would be grateful for any help on this matter.

Many Thanks
Amanda

EDIT: I forgot to mention, the individual XHTML files also validate without problem.
Attached Files
File Type: epub Test.epub (40.2 KB, 267 views)

Last edited by AmandaM; 08-25-2014 at 08:54 AM.
AmandaM is offline   Reply With Quote
Old 08-25-2014, 04:08 PM   #10
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
IIRC, when in kepub mode, Kobo changes from using WebKit for rendering to using Adobe Digital Editions. When ADE encounters anything that it can't parse, it throws away the entire file. And unfortunately, in my experience, ADE doesn't like most @ rules, including @page and @media, along with some IE-specific CSS properties like filter.

As a general rule, with the exception of @font-face, you should segregate any rules starting with @ into a separate file. That way, when (not if) ADE breaks, it will ignore only those rules and not all of your other styles.

In your case, try moving the @page rule into a second CSS file and see if the misbehavior goes away.
dgatwood is offline   Reply With Quote
Old 08-25-2014, 05:29 PM   #11
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by dgatwood View Post
IIRC, when in kepub mode, Kobo changes from using WebKit for rendering to using Adobe Digital Editions. When ADE encounters anything that it can't parse, it throws away the entire file. And unfortunately, in my experience, ADE doesn't like most @ rules, including @page and @media, along with some IE-specific CSS properties like filter.

As a general rule, with the exception of @font-face, you should segregate any rules starting with @ into a separate file. That way, when (not if) ADE breaks, it will ignore only those rules and not all of your other styles.

In your case, try moving the @page rule into a second CSS file and see if the misbehavior goes away.
Nope.. EPub mode uses ADE, kEpub mode uses the NetFront ACCESS engine.
PeterT is offline   Reply With Quote
Old 08-25-2014, 05:48 PM   #12
AmandaM
Junior Member
AmandaM began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Aug 2014
Device: Kindle, Kobo, Nook
Hi

I tried removing the @page but still the same problem.

Any other ideas why this is not working?

Many Thanks
Amanda
AmandaM is offline   Reply With Quote
Old 08-25-2014, 09:19 PM   #13
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Lol. I thought I'd be smart and try the procedure documented in the Kobo ePub-Specs page @ GitHub --> Sideloading for Testing Purposes
Quote:
Desktop
  1. Open the Kobo Desktop app.
  2. Make sure you have Adobe Digital Editions installed.
  3. Select the Library tab and press CTRL+Shift+S on Windows or ⌘+SHIFT+S on a Mac. This will display any files in the “My Digital Editions” folder on your computer with the extension .kepub.epub or .fxl.kepub.epub
This resulted in Kobo Desktop displaying some icons for new material, followed by it crashing. And.... the crashes continue when I restart Desktop.
PeterT is offline   Reply With Quote
Old 08-25-2014, 10:21 PM   #14
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
You know what... I have a hunch that it's ADE is doing this incorrectly; page-break-before / after / inside appear in my reading to be intended to be used when a document is PRINTED; not when it is displayed on a screen.
PeterT is offline   Reply With Quote
Old 08-27-2014, 03:40 AM   #15
dgatwood
Curmudgeon
dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.dgatwood ought to be getting tired of karma fortunes by now.
 
dgatwood's Avatar
 
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
Quote:
Originally Posted by PeterT View Post
You know what... I have a hunch that it's ADE is doing this incorrectly; page-break-before / after / inside appear in my reading to be intended to be used when a document is PRINTED; not when it is displayed on a screen.
Not unless you wrapped it in an @media print rule.

The page-break-* properties apply to all paged media. In the web browser world, that means that it doesn't apply on the screen, because a web browser shows the text as a linear, scrollable flow without page breaks.

However, spec-compliant EPUB readers should always behave like paged media, because they always break the content up into (virtual) pages.

This is not to say that Kobo necessarily follows the spec mind you.

Last edited by dgatwood; 08-27-2014 at 03:42 AM.
dgatwood is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Krappy Kobo Kepub! Shopaholic Kobo Reader 8 06-27-2014 02:20 AM
Is there a way to import kepub to calibre/convert a kepub to other formats? Major General Library Management 9 04-08-2014 10:00 PM
Aura HD KEPUB problems: Books won't load more than once Filmbrain Kobo Reader 38 11-01-2013 04:12 PM
How do I get a kepub out of Kobo Desktop Lynx-lynx Kobo Reader 25 09-15-2013 04:28 PM
Kobo Adobe Epub is a Kepub instead rashkae Kobo Reader 61 01-13-2012 06:15 AM


All times are GMT -4. The time now is 01:42 PM.


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