MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Cover image does not display after replace (https://www.mobileread.com/forums/showthread.php?t=335556)

acharseth 12-11-2020 09:29 PM

Cover image does not display after replace
 
Hi!

I am writing a booklet and started using Apple Pages as editor. I was not able to create a good eBook with this so I installed Sigil, cleaned up the mess Pages created and now have a working book in english which I would like to publish. Before I do this I would also like to have it translated to my native language, Norwegian so I have started on the translation. I then also had to create a new cover image. I added this to the image folder in Sigil, deleted the old one and used the Add Cover function in Sigil to replace the cover image. The new cover image displays fine inside Sigil and in the freda reader on my laptop. After importing it to my iPad it does not display. I only get the title without any image.
I have checked the following:
The name and URL looks correct in:
- cover.xhtml
- content.opf

The cover image displays fine when previewing cover.xhtml in Sigil.
The image file is located in the image directory.

If I revert back to the English cover it displays fine on my iPad.
If I then change to the Norwegian cover again and keep the English cover image in the image folder then the English cover image is displayed on iPad, even if all references are to the Norwegian cover! :blink:
If I then delete the English cover image from the image folder then no cover image is displayed on the iPad.
I have checked the width and hight parameters and they are correct.

Some more info on the cover image part of these files:

cover.xhtml:
Code:

...
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 2480 3508" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><image width="2480" height="3508" xlink:href="../Images/KubebokForsideNO-M.jpeg"/></svg>

content.opf:
Code:

...
<meta name="cover" content="KubebokForsideNO-M.jpeg"/>
...
<item id="KubebokForsideNO-M.jpeg" href="Images/KubebokForsideNO-M.jpeg" media-type="image/jpeg" properties="cover-image"/>
...
<spine toc="toc.ncx">
    <itemref idref="cover" linear="no"/>
...
<guide>
    <reference type="toc" title="Innholdsfortegnelse" href="Text/toc.xhtml"/>
    <reference type="text" title="Tittelsideinnhold" href="Text/titlePageContent.xhtml"/>
  </guide>

Please help me figure out what's wrong.

A couple of additional questions:
  • Can I use the same dc:identifier id="BookId" for the different translations of the same book?
  • Do I need to translate dc:subject?
  • Do I need to translate dc:subject?
  • If so where can I find a list of subject for various languages?
  • What is meta property="ibooks:specified-fonts"?
  • Can/should I remove <meta content="Pages Publishing iOS v1.0" name="generator"/>?

Ripplinger 12-11-2020 10:46 PM

One thought about the image... are you certain there isn't an oddball character in the name of actual Norwegian image, such as æ ø å ö or anything similar that you're not including in the filename in the cover or opf files?

KevinH 12-11-2020 11:49 PM

The cover image itself is not typically part of the spine. The cover.xhtml file that includes the cover should be in the spine. And typically the cover.xhtml is not set to linear="no" in the spine as that means some readers will skip it.

So try changing the first spine entry to point at the cover.xhtml and remove the linear="no" from it.

You did not provide the full manifest so I do not know the id used by cover.xhtml entry to tell you what to replace the "cover" idref in the spine with.

KevinH 12-12-2020 06:39 AM

- The main dc:identifier should be changed as a translation is a different book.
- Update the dc:language metadata to your new language code
- all other metadata that is language dependent should be translated as well
- feel free to remove any generator or other metadata

acharseth 12-13-2020 01:05 PM

1 Attachment(s)
Quote:

Originally Posted by KevinH (Post 4068067)
The cover image itself is not typically part of the spine. The cover.xhtml file that includes the cover should be in the spine. And typically the cover.xhtml is not set to linear="no" in the spine as that means some readers will skip it.

So try changing the first spine entry to point at the cover.xhtml and remove the linear="no" from it.

You did not provide the full manifest so I do not know the id used by cover.xhtml entry to tell you what to replace the "cover" idref in the spine with.

I have attached the full content.opf.xml.
metadata cover is pointing to the image file while manifest id="cover" points to cover.xhtml.

This setup is the same for the english and norwegian version so it seems to me that this should not be the issue but please tell me how it should be setup.

Doitsu 12-13-2020 02:41 PM

Quote:

Originally Posted by acharseth (Post 4068641)
This setup is the same for the english and norwegian version so it seems to me that this should not be the issue but please tell me how it should be setup.

Did you change the BookID value in each .opf file so that each book has a different id?

Code:

<dc:identifier id="BookId">3A0DFC72-6F1C-4DBE-8C30-F6FB0D11B4A4</dc:identifier>
AFAIK, Apple Books uses the BookId value to select the cover image.
(You'll also need to change the id in the toc.ncx file.)

exaltedwombat 12-13-2020 04:35 PM

Is the semantics attribute 'cover image' applied to the new cover picture file?

KevinH 12-13-2020 05:10 PM

Did you try removing 'linear="no"' on the spine idref "cover" entry? Did that change anything for your reader?

Also linear="yes" is the default and is never needed. So you can safely remove 'linear="yes"' from all of the other spine entries.


Quote:

Originally Posted by acharseth (Post 4068641)
I have attached the full content.opf.xml.
metadata cover is pointing to the image file while manifest id="cover" points to cover.xhtml.

This setup is the same for the english and norwegian version so it seems to me that this should not be the issue but please tell me how it should be setup.


KevinH 12-13-2020 08:49 PM

I did not know that. That makes sense as that value should always be unique! Good suggestion!

Quote:

Originally Posted by Doitsu (Post 4068685)
Did you change the BookID value in each .opf file so that each book has a different id?

AFAIK, Apple Books uses the BookId value to select the cover image.
(You'll also need to change the id in the toc.ncx file.)


acharseth 12-16-2020 08:22 PM

It turns out that the problem is in the Apple Books reader. Looks like it does not handle any changes to the cover image. I am guessing it is caching something which makes conflicts. Deleting the app and reinstalling fixed it.

Hitch 12-17-2020 10:21 AM

Quote:

Originally Posted by acharseth (Post 4070237)
It turns out that the problem is in the Apple Books reader. Looks like it does not handle any changes to the cover image. I am guessing it is caching something which makes conflicts. Deleting the app and reinstalling fixed it.

Apple's Books Reader (f/k/a iBooks) has serious caching issues, of that I am absolutely certain.

Hitch

Turtle91 12-17-2020 10:25 AM

Anyway of refreshing/deleting the cache without having to reinstall the app? I'm not asking for me...I don't use apple Books... but might be nice for future thread readers if there was a way that someone knew of.

KevinH 12-17-2020 10:31 AM

If what Doitsu says is right about using the bookid as the key to the cache for cover images (and that makes good sense to me), then never reusing an old bookid for a different book is probably the best way around this.


Quote:

Originally Posted by Turtle91 (Post 4070426)
Anyway of refreshing/deleting the cache without having to reinstall the app? I'm not asking for me...I don't use apple Books... but might be nice for future thread readers if there was a way that someone knew of.


Hitch 12-17-2020 11:32 AM

Quote:

Originally Posted by Turtle91 (Post 4070426)
Anyway of refreshing/deleting the cache without having to reinstall the app? I'm not asking for me...I don't use apple Books... but might be nice for future thread readers if there was a way that someone knew of.

FWIW, we remove the file (book) entirely (delete it) from iBooks and reload it (the book). That's the best way we've found, vis: least time-consuming and least brain-damaging.

Hitch


All times are GMT -4. The time now is 10:20 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.