4

I formatted an epub for an indie author. The author tells me that the cover displays properly on the Kindle and the Nook; I checked it in ADE and Calibre. It passed the IDPF epub validator. However, it is not displaying properly in the Kobo app on the author's iPad. There is a blank page after the cover. I consulted a colleague, who checked some of her covers in the Kobo app. Two covers of the same size, with the same svg coding—one had the blank page and one didn't.

My colleague suspects that the problem covers are being displayed on two pages, with a hairline of color on the top of the blank page. Is the app setting margins that bump the cover down? She tried inserting code to set margins to 0 and that didn't work.

Does anyone have any ideas as to the source of the problem and how to fix it?


I should perhaps add that I work in Oxygen XML editor, which does not like the code for the cover page. It flags it as invalid. All the other files are fine.

However the cover page passes the IDPF validator and displays properly (in most cases :) ).

I tried posting my cover page code here, but it did not display; I could not figure out how to escape it. If anyone can tell me how to escape the code, I can post it and y'all can pick it apart. (Yeah, I'm a duffer coder; it's been a long time since I took programming classes.)

5
  • What is the exact XML error you get?
    – mmmmmm
    Jan 28, 2014 at 11:23
  • Element type svg must be declared. I do have a declaration, svg xmlns="w3.org/2000/svg", in the body, but perhaps that is the wrong code? or it is in the wrong place?
    – Zora
    Jan 29, 2014 at 0:35
  • We need to see the exact code
    – mmmmmm
    Jan 29, 2014 at 10:23
  • What do I do to escape the code? I tried slashes, but that didn't work.
    – Zora
    Feb 1, 2014 at 20:55
  • I can see no attempt at showing Xml here - either indent for 4 characters, enclose in ` or hit the code button (the third one)in the editor
    – mmmmmm
    Feb 1, 2014 at 20:58

3 Answers 3

1

Use a dedicated epub editor instead of a generic xml one, you will have you work greatly improved with a lot of specific optimizations for ebooks.

With Sigil and the Calibre internal editor I've never had this kind of problem, and I use a Kobo ereader regularly.

1
  • I will force myself to try Sigil again. I thought it wrote ugly code. Plus, I like my own standard .css file (tweaked as necessary).
    – Zora
    Jan 29, 2014 at 0:36
1

I'll disagree strongly with Sekhemty: Oxygen is a far superior tool to either Sigil or Calibre, both of which (last I used them, anyway) do all kinds of things to your files without telling you about them. Oxygen is incredibly powerful, and I'd use it in a heartbeat if it wasn't so expensive.

To post the code, try just pasting it into the text box you're typing in, then select it all and click the button above that looks like {}. That should enable you do paste in code, like this:

<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>4_kitchen.xhtml</title>
<link href="template.css" rel="stylesheet" type="text/css" />
</head>

Hope that helps!

1
  • Long time no read Stackexchange. I went through another round of cover angst. Fixed the Kobo problem by downsizing the cover image slightly. However, the code I was using was still not accepted by Oxygen. Later, another indie project, same cover code, will not display on author's iPad. I junked the code using SVG and typed in the code from Elizabeth Castro's epub book. Oxygen likes, validator likes, displays, waiting to hear from author. Nice to hear that someone else appreciates Oxygen. I do want to see all the code.
    – Zora
    May 30, 2014 at 0:33
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" etc etc>

This works in Kobo, make sure the two declarations come before anything, put width, height etc after. Kobo wants the svg declaration first, drop the xmlns="http://www.w3.org/1999/xhtml" you do not need it, but the other two you do need. I struggled with this for some many weeks until I stumbled on the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.