View Full Version : Cover Breaks Publication in iBooks (Yes: yet another iBook cover thread)


DHahn
05-17-2011, 10:06 PM
Hello everyone!

I've recently hand-coded my very first ePub; it's a fixed-layout picture book for the iPad.

Everything looks spot-on fantastic in iBooks however, believing it would be the simplest part of my code, I left the cover for last. I do believe I've followed protocol by creating an xhtml cover document, properly sized cover image, referenced both in the OPF file and included it in the spine (I've tried both with and without 'linear="no"/'). I've even tried other cover images and re-coding the cover page.

Few hours later, and I'm still baffled: the ePub validates, and from what I can garner there's absolutely nothing wrong with my OPF manifest, toc, or xhtml.

I'm wondering if someone here has had experience with something similar, or at least a suggestion!

Here is a screenshot of what my busted iBook looks like:

http://i.imgur.com/MKvnXl.jpg

The cover image itself is 782  997 pixels (slightly less than the suggested max scale suggested at Threepress (http://blog.threepress.org/2009/11/20/best-practices-in-epub-cover-images/)).

As a fixed layout, the viewport is set to 1200 x 1700 on all other pages.

Changing the cover image size didn't solve this problem.

Any help would be greatly appreciated. I've looked elsewhere in these forums and on the web, and I can't find anyone who's had similar problems with a fixed layout ePub.

Attached are my cover, opf, and ncx files. Couple are plain text, because you can't upload some file types it seems.

Thanks!

Toxaris
05-18-2011, 02:47 AM
and where is your cover xhtml file?

DHahn
05-18-2011, 03:04 AM
Toxaris,

In the process of trying to fix this issue I re-coded my cover.xhtml file and gave it a different name... started from completely scratch with it as a last ditch effort.

The cover is attached above as a_cover.rtf (silly, I know, but it seems we can't attach xhtml files in this forum). It is also declared as such in the manifest.

DaleDe
05-18-2011, 12:05 PM
Toxaris,

In the process of trying to fix this issue I re-coded my cover.xhtml file and gave it a different name... started from completely scratch with it as a last ditch effort.

The cover is attached above as a_cover.rtf (silly, I know, but it seems we can't attach xhtml files in this forum). It is also declared as such in the manifest.

A cover must be an image. rtf is not an image format.

Dale

DHahn
05-18-2011, 12:51 PM
DaleDe,

My client will not allow me to put their cover artwork up on a forum — though I noted the dimensions of the png image that we are using for the cover image.

I also can't upload my cover.xhtml file to this forum: files ending in .xhtml are not allowed, it seems.

The image is 782  997 pixels.

And here is the code itself for a_cover.xhtml:

<?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" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta name="cover" content="cover-image"/>
<title>My title</title>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div>
<img id="a_coverimg" src="images/a_cover.png" alt="My Cover" style="max-width: 100%;" />
</div>
</body>
</html>

I hope this clears up some of the confusion I am seeing regarding my cover.xhtml file and the cover image.

Again: I am not allowed to upload this client's artwork to forums on the web.

Best I can do is noting the image size and file name so that you guys can see where it's declared in my manifest, and maybe point out an issue from there.

Toxaris
05-18-2011, 02:39 PM
Could you upload (part) of the epub with another image (same name, other image please!)? That would enable us to check the (cross-)references and structure.

DHahn
05-18-2011, 03:08 PM
Toxaris,

I've fixed this — thanks so much for your willingness to help, though.

There were two problems.

First — and I think most importantly — the eBook broke because I wasn't calling my viewport size in the cover.xhtml file <meta name="viewport" content="width=1200, height=1700"></meta>.

I think that forgetting to do this on each and every page of a fixed layout iBook totally breaks the entire publication.

Secondly, it looks like linear="no" is required for the cover item in the spine.

Of note: my cover image is now 1200x1700px, and it seems to work just dandy even though I've read that it should be less than 1000 pixels wide and high.

I thought that this would be a tough one to solve, but it was pretty basic! Contrary to what my art director thinks, turning off your computer and sleeping on a problem is much more efficient than getting frustrated and staring at code for ten hours straight :)

Thanks again!

Doug