dynamic SVG cover graphics

5 posts / 0 new
Last post

I have several hundred publications with the same cover - just a difference in text content. I would like to use a single SVG graphic and with my xslt stylesheet modify the text at composition time. It seems to work great on the graphic that appears inside my ePub next to the TOC but eBooks refuses to display the graphic as a thumbnail on the book shelf. Instead it generates the generic cover with text from the metadata.

My entry in the [manifest] is:
[item href="img/E-Pub_General_Covers_p17.svg" media-type="image/svg+xml" id="ci" properties="cover-image"/]

I can't believe this isn't possible - or perhaps some other option for dynamic text with a graphic on the cover. Can anyone point me in the correct direction?

This entry looks ok. I use SVG cover images in all of my EPUB3 books.
In several viewers it works as expected, a few others fail obviously for different reasons and in different ways. I think, I have one or two, which do not display the book at all, not only the cover image, but the reason can be another as well, I did not test such bugs systematically yet.

Note that the production of thumbnails for books from cover images is not a task defined or suggested by the ePub format, therefore only an internal problem of each individual viewer.
If the book itself remains accessible including the display of the SVG inside the book, the
viewer itself is ok.

Is 'eBooks' a name of a specific viewer or which viewer do you use? For example current calibre displays a thumbnail. Readium for WebKit viewers does it as well, the version of azardi I have generates a preview of the SVG cover properly, but does not display the book at all, not a program for practical use obviously ...

If the validator indicates, that the OPF-file is valid, and a viewer produces in general thumbnails from cover images, it is reasonable to contact the developers of the viewer/program to fix this.
If those thumbnails are only raster images, maybe they have not implemented something for
vector graphics yet - obviously the simplest option would be to extract the SVG cover image itself and use if for the preview without change - this is what I do for my pages with previews of books.

O.H. - sorry, my mistake. Not "eBooks" but iBooks on my iPad device. So I guess the question is, should I expect the Apple iBook "library" view (or book shelf) to show a thumbnail of my .svg cover. This all works fine with .jpg images.

The ePub validates with epubcheck running inside <oXygen/> so I think my ePub is OK. Might there be something special I need to do to improve the SVG graphic?

Well, the validator should check the SVG file as well, therefore we can assume, that it is technically ok (depending on how this is created, improvements are typically possible - especially if created not with a text editor, but with a program like inkscape etc - I use own scripts and scour to optimise SVGs created by software I did not develop myself ... but such improvements should not be relevant for display or conversion or extraction tools, assuming they have no bugs.)

Presumably Apple will use WebKit to display the content of an EPUB, this has capabilities to display SVG (not so good as for example Opera(Presto), but typically enough to cause no specific problems for simple SVGs).
Therefore my assumption is, that they have no program/library embedded to generate a raster image from SVG files, if they for unknown reasons prefer to use raster images for thumbnails.
Searching for 'iBook SVG cover image' I found only few discussions, some claim to have no problem with this issue, maybe interesting to explore in more detail, if others know about related problems with this 'iBook'. Does apple has a forum to discuss/report problems of this software? Maybe it is worth to look, if there are already related contributions, if not, maybe you can add something - presumably Apple-software is not for free, there should be support to care about this ;o) (well, due to discussions with developers from apple I'm sure, they sometimes try to sell bugs as features and own problematic inventions as standards - do not believe everything ;o) Concerning own problematic inventions - it is possible that this 'iBooks' requires some additional information in the OPF-file to care about cover-images, if it turns out, that others managed to force it to care about SVG cover images.

Thanks O.H. - on to find an Apple forum.

Secondary menu