Thread: Touch .kepub.epub
View Single Post
Old 02-03-2013, 05:42 PM   #53
paola
Wizard
paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.paola ought to be getting tired of karma fortunes by now.
 
paola's Avatar
 
Posts: 2,824
Karma: 5843878
Join Date: Oct 2010
Location: UK
Device: Pocketbook Pro 903, (beloved Pocketbook 360 RIP), Kobo Mini, Kobo Aura
Quote:
Originally Posted by davidfor View Post
For those who are missing the covers when the use ".kepub.epub" books, there is a "simple" fix. For a couple of reason, today I loaded some ePub3 books. These had to be .kepub.epub to use the kepub reader. I was surprised when the books turned up in the library with a cover. I opened up the files to see how the cover was specified. The OPF file, in the <manifest> section, had the following line:

Code:
<item media-type="image/jpeg" id="cover" href="cover.jpg" properties="cover-image"></item>
When I looked at an ePub2, the equivalent line didn't have the "properties". I added this to the epub, copied it to the device, changed the extension and disconnected. The cover image was extracted and displayed correctly.

An interesting thing is that the cover image is used directly. For epubs, the device generates the first page of the book and uses that as the cover image. With the above, the it seems the image is extracted from the file and used.

With the usual "don't try this at home", "make sure you know what you are doing", "it's not my fault if you mess it up", to add this in calibre:

- Select the book
- Right click on it and select "Tweak Book"
- On the dialog that opens, press "Explode book". A window will open with the contents of the book.
- Find the OPF file. It is usually called "package.opf" or "content.opf". This file contains XML.
- Edit the OPF file. In Windows I use Notepad++ but Notepad should be OK.
- Find the "<manifest>" section.
- Somewhere before the "<manifest>" line, should be a line similar to above or the following.
Code:
<item href="Images/cover.jpg" id="cover.jpg" media-type="image/jpeg" />
- Add properties="cover-image" within the tag. THe above would then look like:

Code:
<item href="Images/cover.jpg" id="cover.jpg" media-type="image/jpeg" properties="cover-image" />
- Save the changes and close the window with the files in it.
- On the calibre window, press the "Rebuild Book" button.

The epub is now ready to be put on your Kobo device with the appropriate extension.
I have tried very hard, but I am afraid this does not work for me - I've even tried to rename the image file to "cover" just in case it made any difference, but I am afraid it does not. Frustratingly, the correct cover image is there as the first page of the book when I open it, but it does not show anywhere else: not when shutting off the device, nor in the home screen, nor in the shelves. Any ideas? I am attaching the specific book as it is in the public domain, but I cannot make this work with other epub files, either.
paola is offline   Reply With Quote