Bug 119539 - FILESAVE: Custom cover image not shown in exported EPUB file (some viewers need cover metadata)
Summary: FILESAVE: Custom cover image not shown in exported EPUB file (some viewers ne...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: EPUB-Export
  Show dependency treegraph
 
Reported: 2018-08-27 16:28 UTC by Kriton Kyrimis
Modified: 2019-09-24 04:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
EPUB file as exported from Writer (7.13 KB, application/epub+zip)
2018-08-27 16:28 UTC, Kriton Kyrimis
Details
Hand-edited EPUB file (8.25 KB, application/epub+zip)
2018-08-27 16:29 UTC, Kriton Kyrimis
Details
Screenshot showing thumbnails of the two EPUB files (106.94 KB, image/jpeg)
2018-08-28 15:10 UTC, Kriton Kyrimis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kriton Kyrimis 2018-08-27 16:28:50 UTC
Created attachment 144482 [details]
EPUB file as exported from Writer

If I specify a custom cover image when exporting a document in EPUB format (using default values for all other options), the cover is not shown in my viewer (EBookDroid) on my tablet.

Comparing the generated code with an EPUB document where the cover is shown, I see that there is a missing
<meta name="cover" content="image0001" />
tag in the metadata section of OEBPS/content.opf, where image0001 is the id of the cover image.

If I add the missing tag, the cover is shown in the viewer.

Compare attached bad.epub (as exported from Writer) and fixed.epub (where I added the missing tag by hand).
Comment 1 Kriton Kyrimis 2018-08-27 16:29:44 UTC
Created attachment 144483 [details]
Hand-edited EPUB file
Comment 2 Dieter 2018-08-28 14:29:59 UTC
Couldn't see any differences between those two files, when I opened them with Edge-Browser.
Comment 3 Kriton Kyrimis 2018-08-28 15:10:39 UTC
Created attachment 144516 [details]
Screenshot showing thumbnails of the two EPUB files

(In reply to Dieter Praas from comment #2)
> Couldn't see any differences between those two files, when I opened them
> with Edge-Browser.

Which two files? the two EPUB files or the OEBPS/content.opf file contained in the two EPUB files?

If the former, in which case Edge acts as an EPUB reader, you shouldn't see any difference; you should simply see the single page of the document, which is the same in both EPUB files.

If the latter, in which case Edge acts as an XML viewer, search for
<meta name="cover" content="image0001" />
in fixed.epub's OEBPS/content.opf, which is not present in bad.epub's OEBPS/content.opf.

Check the attached screen shot from EBookDroid on my tablet. It shows the books in a folder. For fixed.epub it shows a thumbnail of the cover. For bad.epub, it shows a thumbnail of the first page of the document.
Comment 4 Kriton Kyrimis 2018-08-28 15:38:54 UTC
From what I've read about covers in EPUB files, although it appears that the cover's entry in the manifest is enough information to identify it as such, the meta tag must also be present.

In addition, for an EPUB file to be compatible withe Apple's iBooks application, a guide section must also be present, with the cover specified there, as well. At the moment, writer does not produce a guide section.

Check, e.g., https://wiki.mobileread.com/wiki/Ebook_Covers
Comment 5 Buovjaga 2018-09-23 13:49:15 UTC
I imported both books separately to Calibre. For both, it shows "You can't judge a book by its cover" as the cover image.

Anyway, as this clearly affects some viewers and the fix is known, I'll set to NEW
Comment 6 QA Administrators 2019-09-24 03:10:22 UTC Comment hidden (obsolete)
Comment 7 Kriton Kyrimis 2019-09-24 04:17:06 UTC
The bug is still present in:

Version: 6.3.2.2
Build ID: 98b30e735bda24bc04ab42594c85f7fd8be07b9c
CPU threads: 2; OS: Linux 5.2; UI render: default; VCL: kde5; 
Locale: el-GR (en_US.UTF-8); UI-Language: en-US
Calc: threaded