View Full Version : html to epub conversion problems


DrPL
12-21-2010, 02:35 PM
Hi,
Please be kind (first post)

I have an html and associated image files, which I used to create a Kindle version of my book. I am now trying to convert this to epub format, and started off using Calibre, which was a good initial first attempt, but it has thrown up some errors.

My book, as it stands at the moment, does not have a table of contents. Is it mandatory to include one in the content.opf file?

Secondly, when I run epubchecker, the first thing it spits out is:

"ERROR: /home/paul/TIS.epub/OEBPS/content.opf(90): required elements missing"

This line is simple "<guide/>" What does this mean? I've read that this could be used to include a front cover. If so, how do I go about doing this? I've had a look through the epub specs but some of the terminology is sadly opaque to me :(

Best wishes

Paul

--
http://www.paullee.com

DrPL
12-21-2010, 03:15 PM
Just another quick question: is it mandatory for the images to be in a separate directory (ie OEBPS/images), and if so, do I need to specify this path in content.opf? All my images are currently in the OEBPS directory.

Jellby
12-22-2010, 05:56 AM
Just another quick question: is it mandatory for the images to be in a separate directory (ie OEBPS/images), and if so, do I need to specify this path in content.opf? All my images are currently in the OEBPS directory.

No, it's not necessary. But the full path (relative to where the .opf file is located) must be specified in the .opf.

charleski
12-22-2010, 06:13 AM
I would recommend using Sigil instead (there's a whole forum for it here). Calibre is good for quick 'n' dirty conversions, but these often run into problems.

You don't need to have a meaningful table of contents, but it's strongly advisable to include one. Doing this in Calibre means telling it how to parse your html source to find the chapter headings, in Sigil you just need to apply the correct heading style to your titles. The epubcheck error sounds like it's missing a required metadata element, <title>, <identifier> and <language> are required, but Calibre often skips the <language> element.

Fabe
12-22-2010, 07:13 AM
I second charleski's point: use Sigil.

1. Download Sigil to your computer. http://code.google.com/p/sigil/
2. Open your original HTML file in Sigil.
3. Break the opened file into logical chapters.
4. Give each chapter a name and those names heading designations (h1 or h2 for example).
5. Save as .epub.
6. Check out your Table of Contents in Sigil (Tools/TOC Editor...).
7. Validate your ePub file. It should pass easily.
8. View your new ePub file in any (and all) desktop readers you have.

That's the basics. Next you fine tune. - Fabe