Fixing Adobe InDesign CS3's ePub files (part 1)

InDesign allows you to create ePub e-book files direct from your book's page layout. But it has its problems. Here's how to correct them

» Part 2 - Fixing the content.opf file
» Part 3 - Fixing the toc.ncx file and CSS

 

At WebVivant Press, we use Adobe InDesign CS3 for producing both print books and ePub format e-books. InDesign (ID) is a great piece of software for laying out magazines and books. And for creating e-books it's ... well, broken.

Savvy ShoppingWhen you use the 'Export to Digital Editions' option from InDesign the resulting ePub file (generally) opens fine in Adobe Digital Editions (ADE). However, if you look at the file info from within ADE, you'll probably see the message: 'The document appears to have minor errors that might cause it to be displayed incorrectly'. This is a message you come to fear greatly when creating e-books.

So this post is about how we dealt with these 'minor errors'.

Now, it's possible that CS4 does a much better job. But Adobe's prices are such that upgrading would soak up a lot of book profits. And I suspect we'd still end up tweaking the e-book files by hand. (If there are any InDesign CS4 users out there who can tell us how well it deals with the issues outlined below, we'd love to hear from you.)

Running into problems

I actually encountered these minor errors the first time I output an ePub file from InDesign. The book wouldn't load into ADE. It turned out that the 'minor' errors were, in fact, fatal. Then I discovered that removing a copyright symbol from the metadata of the ID file fixed the problem. This shouldn't be so: ePub files created with the normal, default utf-8 encoding are perfectly capable of including the copyright symbol, using the © HTML entity. But removing it seemed to work and I got on with my life.

Then I noticed that, while the files would load, there was still a warning about 'minor errors'. Also, ADE showed the publisher as 'unknown'. ID has no metadata field where you can enter the publisher's name.

I think the problem is that CS3 is simply out of date and is producing files to an older, obsolete standard. Whatever the source of the problems, I decided to fix them by hand.

Opening the ePub file

These notes are based on the ePub file we created recently for a free e-book - Make Do & Cook: Savvy Shopping.

As I discussed in a previous post, an ePub file is just a zip file. You can unzip it and play with the contents. The tweaks I discuss here are those I used to fix ID CS3-produced files, but may also help with files produced by other means.

One way of testing corrected ePub files is simply to load them into ADE or some other e-book reader and see if there are any complaints.

A much better method is to use epubcheck, a free utility that tests your ePub file for compliance with the current standard. It's not without its own issues: epubcheck has a habit of issuing annoyingly vague error messages. For example, you might be told that a section of the file has 'missing elements' but are given no clue as to what these are (presumably, epubcheck knows because it's recognised that they're missing).

It is possible to run epubcheck as a web-based app, but the easiest method is to run it from the command line. It's Java-based, so should run on pretty much any platform. As discussed in Zipping ePub files, I've created a short shell script for zipping the various files back into an ePub package, so my workflow is:

  1. Unzip the ePub file created by InDesign.
  2. Edit the content.opf and toc.ncx files.
  3. Zip up the files into an ePub package again using a single command. This leaves the unzipped files still available if further editing is needed.
  4. Test using epubcheck. If this fails, go to 2. If it succeeds, you're done.

So, if you're ready to start playing, copy your ePub file into a new directory all by itself (easier to see what you're doing this way) and unzip it. Inside, you'll find a file called 'mimetype' and two sub-directories - META-INF and OEBPS. (If the ePub file was created by some method other than outputting from InDesign CS3, the file structure, and even some filenames, may be different, but the principles will be the same.)

Fixing ID CS3's ePub shortcomings involves editing two files in the OEBPS directory - content.opf and toc.ncx. In the next two parts, we'll look at editing those files and also take a quick look at the CSS file.


Resources:

» Part 2 - Fixing the content.opf file
» Part 3 - Fixing the toc.ncx file and CSS

 

Comments (4)

Tags: e-books ePub InDesign CS3 books self-publishing publishing

Please note: comments on this site are moderated - partly to eliminate spamming and partly to avoid wasting space and bandwidth. Any comments deemed offensive, juvenile, stupid or pointless are deleted.

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code:
 
Graham
Posts: 11
Comment
ePub and CS3
Reply #4 on : Thu June 10, 2010, 14:19:19
Help!

I don't even know how to export from indesign to the .epub format. Is there a plugin, or does indesign (CS3) already have the export option. I'm stumped.

Thanks
admin
Posts: 2
Comment
Re: Fixing Adobe InDesign CS3's ePub files (part 1)
Reply #3 on : Thu June 10, 2010, 15:40:48
Graham,

If you've created a 'book' in InDesign (ie, a multi-file document), use the book's menu option 'Export book to Digital Editions...'.

If you're using a single file, use 'File -> Cross-media Export... -> XHTML / Digital Editions...'
owen bell
Posts: 11
Comment
graphic novels
Reply #2 on : Tue August 10, 2010, 12:19:39
I have been told that graphic novels ( which of course are comprised of pages of images not just text ) are not suitable for conversion to ePub files. Is this correct and if so, how is it possible to get a 'non ePub' eBook onto iPad?
admin
Posts: 2
Comment
Re: Fixing Adobe InDesign CS3's ePub files (part 1)
Reply #1 on : Tue August 10, 2010, 14:09:48
Owen, As far as I know, iTunes Connect (the Apple service you use to upload books to the iBookstore) only accepts ePub format. Currently, ePub supports only very simple use of images. PDF is a more suitable format for graphic novels. Another option is to produce books as apps (which is the route magazines & newspapers are taking for the iPad) but that requires some serious coding skills.