EpubCheck To The Rescue!

EpubCheck To The Rescue!

sigilSIGIL is a popular tool for generating EPUB files. I’m still getting the hang of it.

“Hey, I know CSS and HTML. I’ll make my own ebooks! How hard could it be?”

Famous last words… :)

Anyone who creates ebooks from scratch- without using a tool that promises to handle it with the push of a button, and doesn’t let you see what atrocities it’s actually committing- knows it can be a, um, trying process. Usually a multi-day slog that involves a good bit of cursing and/or breaks away from the computer before your welling frustration vents in irrevocable ways.

Ebook creation is far more finicky than creating a normal document, or even a webpage. There are so many things that must be done to ensure proper positioning and formatting from one ebook-reading device to another, because there’s no standardization across devices. There’s also little to no documentation on what each device renders, ignores, or expects to see inside each ebook it opens.

Even when you anticipate every quirk you know about, you might never figure out why your title gets split across three pages on the Nook, but looks fine everywhere else.

If you have any web development experience, recall what it was like to build webpages back when you had to account for every web browser’s interpretation of HTML being wildly different. Ebooks are on the same level- with a healthy dose of crack mixed in.

However, once you grind through bizarre CSS kludges and generate an EPUB file that displays properly in every device/program you have on hand, you’re in the home stretch! EPUB works nearly everywhere- everywhere but Amazon/Kindle, which uses its proprietary MOBI format instead. But hey, Amazon provides a free command-line tool called KindleGen that converts EPUB to MOBI! Great!

So you try to convert your EPUB…

…and the conversion fails…

…and KindleGen won’t explain why, even when you ask for “verbose” output.

You Google the error codes it gives you. Hey, if they went to the trouble of defining error codes, surely they’re documented somewhere!

Nope. You find one whole post on the entire Internet. In Japanese.

kdp_japaneseSumimasen! Nihongo o sukoshi dake hanashimasu!

I was at this point last week, after hours of fighting with broken hyperlinks and non-centering titles, and quite ready to smash things. Fortunately, I came upon this post first, which recommended running the EPUB file through a free Java-based utility called EpubCheck.

Thank you, EpubCheck! If your EPUB is broken in some fashion, it tells you exactly what’s wrong in plain English.

In my case, it turns out I’d forgotten to define some required metadata. The display devices I tested with didn’t care about the missing metadata, but KindleGen wanted it. (It would’ve been nice if KindleGen had told me that itself, but oh well.) When I added the metadata to the EPUB, I was able to convert it to MOBI without an issue.

I wanted to call out EpubCheck this week because this is the first time I’ve ever heard of it, despite a ton of prior effort and research on ebook generation. Anyone who makes EPUB files and wants to be 100% sure they’re ready for prime-time will want to install and use this tool.

There’s tons more I can say about ebook generation, but I’m not sure what might be useful to you guys. I’m also not sure if you’re fellow computer nerds, or need extra hand-holding. I’d be happy to write any how-to you might request, at any tech level. I’m familiar with creating EPUBs and MOBIs, and very experienced with CSS and HTML in general.

If you want help with something, request it in the comments and I’ll write a post for you!


4 thoughts on “EpubCheck To The Rescue!

    1. Thanks for this, Markus! I’ll give it a try the next time I convert to MOBI. I’m curious how the result compares to what Amazon’s conversion tools produce, appearance- and size-wise. Minimizing file size is important, since Amazon charges you more for selling larger files.

  1. Ellis, it worked well for me while trying to convert a pdf document of several pages into a mobi format. I honestly don’t know about Amazon’s conversions tools to have an idea about a comparison but you can give it a try and see how the result appears to you. All the best!

Leave a Reply

Your email address will not be published. Required fields are marked *