View Full Version : Epub cover image issue


vipinpa
05-20-2010, 12:58 AM
Hello Everyone,

I have some issue with cover page. The problem is my cover image showing last of the page when I load it in calibre.

I have done .opf like this

in <metadata> section put this
<meta name='cover' content='cover-image'/>

and in <manifest> section cover image and title page like this.

<item id="title" href="title.html" media-type="application/xhtml+xml" />
<item id='cover-image' href='images/cover.jpg' media-type='image/jpeg' />
etc..
'images/cover.jpg' in title.html file.

and in <spine> section ,

<spine toc="ncx">
<itemref idref="title" linear="no"/>
<itemref idref="other pages" />
etc...

finally in <guide> section

<guide>
<reference type="cover" title="Cover Image" href="title.html"/>
etc

I want to show first cover image when I load .epub in calibre. Can you please help me, if I made any mistake in that or need to add anything else?

Please help me.

Vipin

Jellby
05-20-2010, 05:27 AM
Items in the spine with linear="no" don't normally show in Calibre ebook reader. They are accessible if there are hyperlinks to them, but not through normal browsing.

vipinpa
05-20-2010, 07:44 AM
Thanks for your reply.

But why cover page showing at the end of the book?

Actually I am converting .epub to .mobi for kindle. If I remove linear="no" , then it will show cover page at the start, but in Kindle previewer it showing two cover pages.

Spend so much time on this.

Please help me.

Thanks
Vipin

pdurrant
05-20-2010, 08:23 AM
Spend so much time on this.

Please help me.


Test your ePubs in something other than the Calibre viewer.

vipinpa
05-20-2010, 08:32 AM
I have checked it in bookworm.oreilly.com. I think here it is looking good.

But how can we fix it in calibre and .mobi file in kindle previewer?

Thanks,
vipin

zelda_pinwheel
05-21-2010, 05:29 AM
Hi vipinpa, i've moved your thread to the epub forum where it will be more visible. good luck with your problem. :)

vipinpa
05-21-2010, 05:39 AM
Hello zelda_pinwheel,

Thanks for moving my thread to epub forum. I am really waiting for a solution..

Thanks,
Vipin

pdurrant
05-21-2010, 06:11 AM
But why cover page showing at the end of the book?

Actually I am converting .epub to .mobi for kindle. If I remove linear="no" , then it will show cover page at the start, but in Kindle previewer it showing two cover pages.


I think you'll need to upload a sample epub before anyone can give a definitive answer. It might just be a problem with the Calibre viewer, or you might be misinterpreting what you're seeing.

I'd suggest keeping the linear="no", as otherwise you'll have problems with the Kindle file having two versions of the cover image at the front. ePub viewers will show the cover by other means.

vipinpa
05-21-2010, 06:44 AM
Hello,

I am attaching epub here. you can see cover image at the end.

Please check it and let me know if I made any mistake in it.

Thanks in advance.

Vipin

pdurrant
05-21-2010, 11:08 AM
There are lots of mistakes, but none that affect the cover image. It seems that the Calibre Viewer just decides to put any linear="no" items in the spine at the end, instead of only showing through through TOC access.

As I said - you need to test in more than the Calibre viewer. Adobe Digital Editions is good, since most people will be using one form of it or another. But test in more than one viewer if you can.

You also need to run epubcheck - your .ncx file has a problem with duplicate play order numbers, and your XHTML isn't compliant.

And once you have epubcheck, don't forget that it only checks technical problems with DTD compliance. Passing epubcheck doesn't mean your epub will look good, or read as you expect.

I'd also suggest cutting the cover image down to just the front cover.
Hello,

I am attaching epub here. you can see cover image at the end.

Please check it and let me know if I made any mistake in it.

Thanks in advance.

Vipin

vipinpa
05-23-2010, 11:57 PM
Hello pdurrant,

Thanks for your reply. It is not fixed yet. I am trying to fix it.

Can you tell me what are the major mistakes I have made in the epub please..

Thanks,
Vipin

DoctorOhh
05-24-2010, 12:23 AM
Hello pdurrant,

Thanks for your reply. It is not fixed yet. I am trying to fix it.

Can you tell me what are the major mistakes I have made in the epub please..

Thanks,
Vipin

Your cover page isn't annotated as a cover page. Open up the ePub using Sigil (http://code.google.com/p/sigil/). Right click on title.html - Add symantics - check cover. Then save the file.

I hope this helps.

vipinpa
05-24-2010, 01:13 AM
Hello dwanthny,

Thanks for your reply. Actually I am a beginner in epub. I have done what you explained. But I didn't get what is the issue. If you don't mind, please give me bit more explanation about it.

Thanks,
Vipin

DoctorOhh
05-24-2010, 01:20 AM
Thanks for your reply. Actually I am a beginner in epub. I have done what you explained. But I didn't get what is the issue. If you don't mind, please give me bit more explanation about it.

You and I are at the same beginning level. I just noticed that item in Sigil, tried it on your book and it worked.

It seems this setting labels that html as the cover page and it is treated as such from then on.

Now you know everything I know on the subject. :)

pdurrant
05-24-2010, 03:11 AM
I didn't say major. I did say:

your .ncx file has a problem with duplicate play order numbers, and your XHTML isn't compliant.

regards,

Paul

Hello pdurrant,

Thanks for your reply. It is not fixed yet. I am trying to fix it.

Can you tell me what are the major mistakes I have made in the epub please..

Thanks,
Vipin

vipinpa
05-24-2010, 05:21 AM
Hello dwanthny,

Yes when I change linear ='yes', then it works in calibre and other epub reader. But when I convert epub file to .mobi file and open in kindle previewer, then cover page showing two times. This is the issue now. I want both work properly.


Hello Paul,

Yes I see it and changed. Thanks.


Thanks,
Vipin

vipinpa
05-24-2010, 05:24 AM
Thanks,
Vipin

DoctorOhh
05-24-2010, 05:30 AM
Yes when I change linear ='yes', then it works in calibre and other epub reader. But when I convert epub file to .mobi file and open in kindle previewer, then cover page showing two times. This is the issue now. I want both work properly.

I don't know what linear ='yes' is.

I just know when I added the symantics cover to your title page via Sigil your title.html became the cover in the ePub. After converting the ePub to mobi (via Calibre) Kindle4PC shows only 1 cover image and all looks good.

Sorry I can't help more.

Update: Some more info for you. After I set the cover via Sigil and saved the ePub file the content.opf file looked like this:

Update 2: Just opening your file in Sigil and saving it without doing anything also created the below result.

<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookID" version="2.0">
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
<dc:title>American Hemorrhagic Fevers: Global Status - 2010 edition</dc:title>
<dc:rights>Copyright (C) 2010, Inc</dc:rights>
<dc:subject>American </dc:subject>
<dc:creator opf:role="aut">test </dc:creator>
<dc:publisher>test</dc:publisher>
<dc:identifier id="BookID" opf:scheme="UUID">2cc5e1dd-84bf-4a3d-ab64-38723e266915</dc:identifier>
<meta name="cover" content="cover.jpg"/>
<meta name="Sigil version" content="0.2.0"/>
</metadata>
<manifest>
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
<item id="cover.jpg" href="Images/cover.jpg" media-type="image/jpeg"/>
<item id="ebook_kindle_disease.css" href="Styles/ebook_kindle_disease.css" media-type="text/css"/>
<item id="about.html" href="Text/about.html" media-type="application/xhtml+xml"/>
<item id="chapter1.html" href="Text/chapter1.html" media-type="application/xhtml+xml"/>
<item id="chapter2.html" href="Text/chapter2.html" media-type="application/xhtml+xml"/>
<item id="title.html" href="Text/title.html" media-type="application/xhtml+xml"/>
</manifest>
<spine toc="ncx">
<itemref idref="title.html"/>
<itemref idref="chapter1.html"/>
<itemref idref="chapter2.html"/>
<itemref idref="about.html"/>
</spine>
<guide>
<reference type="cover" title="Cover" href="Text/title.html"/>
</guide>
</package>

Bottom line, once your file was opened in Sigil and saved it converts fine.

vipinpa
05-25-2010, 12:28 AM
Hello dwanthny, Thank you very much for your help. I hope everything almost okay for me. Some small issues now, that I will try to fix.


Thanks everyone for your help.


Vipin