![]() |
#1 |
Junior Member
![]() 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; } Code:
p class="CenterText">This text is centered</p> div class="pagebreak"></div> p class="CenterText">More Centered Text</p> 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 |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Quote:
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 |
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Aug 2014
Device: Kindle, Kobo, Nook
|
|
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() 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. Last edited by AmandaM; 08-25-2014 at 08:54 AM. |
![]() |
![]() |
![]() |
#10 |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,490
Karma: 78910112
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Quote:
|
|
![]() |
![]() |
![]() |
#12 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#13 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
|
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#15 | |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
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. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |