“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.
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!