Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 09-28-2018, 02:40 AM   #1
SunshineFish
Junior Member
SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!
 
Posts: 8
Karma: 100000
Join Date: Jan 2013
Device: Kobo H2O
EPUB metadata not read on Kobo devices

I've developed a library to create epub files from collections of images (source code at https://github.com/Aftnet/CPubLib if anyone's interested).

The files generated are epub3 compliant (validator passes them) and so far work as they should on
- Edge on Windows 10
- iOS and macOS's Books app
- Lithium on Android
- Kobo app on Android

Kobo devices however ignore some metadata: cover and, more importantly, chapters index.

Is this a known issue with Kobo ereaders? Any chance of getting them to fix it?

If anyone wants to test for themselves, here (https://drive.google.com/open?id=12e...Fgg75qQuRBe1ZI) is a sample. It has a cover and a chapter for each page.

P.S. For those asking why bother making this vs just using CBZ/CBR, those formats are not supported by native (as in, built into the OS) apps on any platform and they do not have metadata, making organization a pain on Kobo devices.
SunshineFish is offline   Reply With Quote
Old 09-28-2018, 03:02 AM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
I don't see any issues with the metadata or cover. When I sideloaded the book, the metadata was read and the cover is the first page. Kobo is only handling the comments, publisher, title and author. It doesn't read the tags. The ToC didn't work. I think that is because it is an epub3 and there is no NCX to fallback to.

Sideloading as a kepub (rename to use ".kepub.epub" as the extension) and it all works. The kepub renderer handles epub3 better than the RMSDK based renderer used for epubs.

Another difference in the epub and kepub handling is the cover. For epubs, Kobo renders the first page of the book and uses that. For kepubs, it looks for an image with the appropriate properties in the OPF. The yellow image with the word "Cover" has these properties.

If you want to use CBR/CBZ and you use calibre, my Kobo Utilities plugin can set all the metadata correctly once the book has been imported on the device. It will do this for any book format. You send the book to the device, disconnect and let the import happen. Then connect and use the plugin.
davidfor is offline   Reply With Quote
Old 09-28-2018, 03:15 AM   #3
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,631
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Too late to answer (better answer over this message)
Terisa de morgan is offline   Reply With Quote
Old 09-28-2018, 03:51 AM   #4
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
cover -> You don't mark any file as cover (usualy the first one, but...).
Calibre's solution:
Spoiler:
Code:
    <item href="0b393e09-d459-4110-8060-6b13a25c539c.xhtml" id="p_0b393e09-d459-4110-8060-6b13a25c539c" media-type="application/xhtml+xml" properties="calibre:title-page"/>

chapters index -> You don't create a toc.ncx as davidfor said before.
display: flex; -> consider adding -webkit-display: flex;
object-fit: contain; -> perhaps object-fit: cover;?
I like Calibre's solution:
Spoiler:
Code:
 <div style="page-break-before:always; page-break-after:always; page-break-inside:avoid">

      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%" viewBox="0 0 420 600" preserveAspectRatio="xMidYMid meet">
        <image width="420" height="600" xlink:href="64798ac2-16c4-4c81-9414-85953e2b8e0b.png"/>
      </svg>

    </div>

I prefer rotated images. Two-scale images are pretty... well, I dislike them.
Good luck.

Last edited by jcn363; 09-28-2018 at 04:02 AM.
jcn363 is offline   Reply With Quote
Old 09-28-2018, 07:29 PM   #5
SunshineFish
Junior Member
SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!SunshineFish rocks like Gibraltar!
 
Posts: 8
Karma: 100000
Join Date: Jan 2013
Device: Kobo H2O
You guys are seriously awesome.

I'm going to give your solutions a shot as soon as I can.

A couple of questions for jcn363

Quote:
Originally Posted by jcn363 View Post
Code:
properties="calibre:title-page"
How does that help? That is definitely not part of the epub standard.

Quote:
Originally Posted by jcn363 View Post
You don't create a toc.ncx
I thought toc.ncx was deprecated in epub3 and one was meant to use nav.xhtml instead. Wrong?

Finally, what are two-scale images? You mean images with a modified aspect ratio from their native one (stretched)?
SunshineFish is offline   Reply With Quote
Old 09-28-2018, 07:57 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by kaworu1986 View Post
You guys are seriously awesome.

I'm going to give your solutions a shot as soon as I can.

A couple of questions for jcn363



How does that help? That is definitely not part of the epub standard.
Actually, it is part of the epub standard. They are flexible in how things are represented in properties. Some are general properties, and others are in specific namespaces. This is a calibre property. Everything else will probably ignore it. From my understanding, what you have defined is correct for epub3. The following defines which is the cover image:

Code:
properties="cover-image"
Quote:
I thought toc.ncx was deprecated in epub3 and one was meant to use nav.xhtml instead. Wrong?
The toc.ncx is deprecated in epub3, but, is still supported for backwards compatibility. There are still plenty of epub2 only devices and apps out there that need it. The RMSDK based epub renderer in the Kobo devices is one of them.
davidfor is offline   Reply With Quote
Old 10-02-2018, 05:38 AM   #7
jcn363
absolute beginner
jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.jcn363 ought to be getting tired of karma fortunes by now.
 
jcn363's Avatar
 
Posts: 323
Karma: 1750999
Join Date: May 2017
Location: Go with the wind (43°19'17.7"N 2°00'19.4"W)
Device: ka1
Quote:
Originally Posted by kaworu1986 View Post
You guys are seriously awesome.

I'm going to give your solutions a shot as soon as I can.

A couple of questions for jcn363



How does that help? That is definitely not part of the epub standard.



I thought toc.ncx was deprecated in epub3 and one was meant to use nav.xhtml instead. Wrong?

Finally, what are two-scale images? You mean images with a modified aspect ratio from their native one (stretched)?
The first part is answered by David.
The second one. Two-scale image is an image with two different scales, one for horizontal and a different one for vertical. I mean, I like proportionality.
Good luck.
jcn363 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Marvin and Aldiko Can't Read ePub Metadata or Cover Page mjdz Marvin 2 06-24-2017 10:05 PM
Calibre can't read metadata from epub matonkiki Library Management 2 12-18-2015 07:44 AM
How to Sync Read Progress between kobo devices using calibre? lambstone Kobo Reader 9 09-07-2015 10:57 PM
All Kobo devices are 'With Offers' devices murg Kobo Reader 14 11-28-2012 10:49 AM
epub files on two different devices? Sony and kobo? gbloom182 ePub 9 01-09-2011 06:38 PM


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


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