View Full Version : EPUB Creation: Cover Page blank in ADE


Janephew91
09-28-2011, 05:16 PM
This is my second epub book that I have created. The first one I had no issues with the cover file but this one is blank when opened in ADE.

After I created the EPUB, I unzipped it and created a cover.xhtml file which says:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ttctc-cc.xhtml</title>
<link href="template.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="ttctc-cc">
<div class="generated-style">
<img src="images/cover.jpg" alt="Cover Image" style="max-width: 100%;" />
</div>
</div>
</body>
</html>

Then added these tags in the content opf to the respective locations:

<meta name="cover" content="cover-image" />

<item id="ttctc-cc" href="ttctc-cc.xhtml" media-type="application/xhtml+xml"/>

<item id="cover-image" href="images/cover.jpg" media-type="image/jpeg"/>

<itemref idref="ttctc-cc"/>

I also made sure that the JPEG was RGB and not CMYK which is a suggestion I found while searching the web. I checked and rechecked and I can't seem to figure out where the problem is.

Has anyone else ran into this problem, if so, how did you fix it? :help:

Any suggestions would be great. Thank you so much!

Adjust
09-28-2011, 11:05 PM
I was going to say the you image was in CMYK...But you've checked that, right?


Keep the image dimensions to 600px by 860px or try instead of 100%, 95%.

Does the epub validate?

Can you upload it here so I can see what you've done:
This is what mine looks like:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cover</title>
<link href="template.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="cover">
<div class="image">
<img src="images/Cover.jpg" alt="Cover.jpg" height="95%" /> </div>
</div>
</body>
</html>

Inside the metadata:
<meta name="cover" content="my-cover-image"/>

Inside the manifest:
<item id="my-cover-image" href="images/Cover_kindle.jpg" media-type="image/jpeg"/>

Inside the spine:
<itemref idref="cover" linear="no"/>

Inside the guide:
<reference type="cover" title="my-cover-image" href="images/Cover_kindle.jpg"/>

wannabee
09-29-2011, 12:06 AM
I've been making epubs from InDesign CS5 from a single file instead of a book and exporting a file without a cover. I then convert it in Calibre from epub to epub and add the cover during that process. No coding no hassles.
You can achieve the same thing in Sigil as well. You can insert a cover image and nominate it as a cover file.

Toxaris
09-29-2011, 04:28 AM
Did you remember that ePUB's are case-sensitive?

Janephew91
09-29-2011, 05:18 PM
Yes I did check that the image was not CMYK and it's not. Thank you all so much for your advice.

I had no idea that you could add a cover in Calibre and Sigli if you reconvert the EPUB.

I'm not sure what I did but I went through the validation process with EPUBcheck and fixed a couple errors that came up and now it works. So, I guess it had something to do with that.

Thank you all again!