Brown River Queen cover art

Monday, March 18, 2013

Frank's Handy Guide to KindleGen. And Suicide. Because You'll Need Both.

It all looked so simple. So easy.

As many of you know, I teach a couple of writing classes. I've been teaching them for a while now, and I finally put most of the material together into a short book.

It's nothing fancy. No tables, no graphs, no interior trickery at all. Thus I thought to myself, 'Self, why don't we package the whole works as a Kindle book, and maybe make enough extra money from it to buy a single burrito, come next May?'

Fool that I am, I agreed, even though my track record of Cunning Plans tends toward catastrophe and head injuries of mild to moderate severity.

But this is an e-book. Surely, I decided, I can safely create and publish a single short Amazon e-book all on my own without involving paramedics or morticians.

I've done it before. Wistril Compleat, On the Road, The Far Corners -- all are short story anthologies composed of stories I sold to print magazines back in the 90s. I put all those titles out myself, mainly for fun. So why shouldn't I be able to do so again?

After all, Amazon now provides free formatting and previewing software. Back in the old days, I had to do all the formatting by hand! Not so now, with the amazing Kindlegen!

Like I said, it all looked so easy.

First, I downloaded the free Amazon formatting program, Kindlegen.

Then I downloaded the free Amazon previewer, Kindle Previewer.

The advantage to using these two items, I am told, is that you are absolutely assured a Kindle-compatible product. No weirdness in formatting. No glitches. You can see how your ebook looks on each and every Kindle model, and fix any problems before you take the book to market.

Sounds ideal!

I used a free HTML editor called HTML-Kit to create my HTML ebook file. This part of the process is one I know. There's nothing at all hard about it. You only need know a dozen or so HTML commands.  Most of the code is self-explanatory.

That's how I created the other ebooks. Turn the book into an HTML file. Zip that file and the interior cover image together. Upload them to KDP. Yes, I know Amazon now claims you can use Word to create your ebook, and then save that as a Web page file, and upload directly to KDP, thus skipping all the HTML hand-coding.

And you can. You can also dance with a goat. As with goat-dancing, though, the results are usually messy and often completely unacceptable. You'll find weird spaces inserted at random, odd indents, big gaps in the text -- no. Just no.

Here's how I understood Kindlegen to work:

  1. Create your HTML file.
  2. Use Kindlegen to convert this HTML file into a perfect .mobi file.
  3. Use the Previewer to check your file for accuracy.
  4. Upload your cover image and your new .mobi file to Amazon.
  5. Become rich, buy your own tropical island, crush your enemies beneath your merciless feet.
I got as far as step 4 and thought myself a clever lad. I followed Amazon's documentation (I wince just using the words 'Amazon' and 'documentation' in such close proximity) and was pleased with the results.

I uploaded the new ebook and prepared my feet to begin the crushing of enemies like grapes.

What I didn't understand was that I'd skipped a step. Do you see step 3.5 above?


Neither did I.

Step 3.5 is displayed in invisible letters, you see. And what is says is this:

3.5 HAHAHAHAHA. We forgot to mention that for your interior cover image to display, you'll need to create an ncx file, and opf file, an xyz file, solve Fermat's Last Theorem, calculate the value of pi out to eleventy billion characters, comb Nessie's hair, teach Bigfoot to scuba dive, and finally provide us with a singing albino sea otter who can also drive a cab.

Here's what the Kindlegen README file should state, in towering letters of blood and fire:


Because by firing up Kindlegen you just entered Hell.

I was confused and a bit embarrassed at having released a Kindle book into the wild with an error. So I quickly grabbed my HTML code, gutted the portion of it that should have resulted in the cover being shown inside the book as well as outside, and replaced the interior cover with the title of the book in big letters instead. At least it doesn't look goofy, and I was sure I could resolve the missing interior cover problem in just a few minutes.

Ha ha ha. 

The documentation provided with the Kindlegen file never bloody mentioned ANYTHING about an ncx file, or an opc file. But Googling the problem quickly pointed out that both these files were required before Kindlegen could create the final file for upload.

Look, I'm no hacker, but I know enough to code and maintain my own website. I'd never heard of ncx or opf filetypes. I had no idea what they were, what they did, or how to find them.

The Amazon documentation?

I might as well go back to goat-dancing. Never a single word was spoken of these files, their purpose, their origin, or their content. 

The references I did find via Google all seemed to assume that the files simply sprang into existence from the heavenly aether. Seriously, I've never seen such an obtuse and uninformative collection of technobabble. What does ncx stand for? Nonexistent Carnivorous Xenophobe? What about opf? Obnoxious Probe Fatality? Ornithopter Pressure Frame?

Do I create the these elusive entities? Does Kindlegen? Are they files at all, or some kind of meat? Pets? Aircraft?

The more I read, the more confused I became.  In fact, after scouring half a dozen tutorials and discussion boards, this is how I've determined one must actually use Kindlegen to create a Kindle ebook:

  • Don't. Seriously, just wave money at someone until they agree to format your book for you. If they need a kidney give them that as well, you have two.
  • Okay, but don't say I didn't warn you.
  • Download Kindlegen and Kindle Previewer.
  • While you wait, drive to the liquor store, and head right for the rotgut whiskey because YOU WILL NEED IT. 
  • Create your HTML file. Now look at it. Look at it HARD. 
  • Do you see ncx and opf and half a dozen other previously unknown file formats appear?
  • Take a swig of whiskey (first of many, I assure you) and stare harder.
  • Run Kindlegen. Run around your living room. Both activities are equally likely to result in the creation of a fully-functional e-book.
  • Use the Kindle Previewer to assure yourself you have failed.
  • Look under the couch. Maybe that's where opf files wind up. No one seems to know. But there might be loose change under there, so check anyway.
  • Man, the bottom half of this Old Overcoat whiskey is really smooth.
  • Still no ncx files? Plenty of whiskey left. Maybe they only come out at night.
  • Really, who needs a lousy interior cover image anyway?
  • Leprechauns. That has to be it. Wait for a leprechaun to appear. Trick him into playing a game of riddles, and win by asking 'Where do ncx files come from?' 
  • Give up and decide to patch the roof instead.
  • Be careful on the ladder, because dude, you are hammered.

If you're at all interested in the writing guide, and you believe you can live without an interior cover illustration, click here. 

And if you ever decide to self-publish using Kindlegen, take my advice and get two bottles of Old Overcoat.


  1. Just use Calibre. Or dance with a goat, if you insist.

    I thought about doing a cookbook (with recipes designed to help Dry Eye). But the thought of having to format pictures for all the various Kindles...and the fear that I wouldn't sell even enough copies to afford that burrito...well, can I borrow your goat? I feel a need to dance!

  2. Hmm. I didn't have too much trouble finding information on creating (at least) the ncx file. Nevertheless, clearly Amazon's do-it-yourself solution is not all that a bag of pig's knuckles.

    Bought the writer's guide, cause...that's how I roll.

  3. Maria -- I have Calibre, but someone told me Amazon made some changes that rendered files created by Calibre inoperable. This may have been the same person who told me the Easter Bunny delivers opf files every other Arbor Day, so maybe I shouldn't have taken them seriously. In any case, I have now sworn off self publishing forever, or at least until my eyes stop twitching.

  4. Thanks Black Cat! I appreciate it.

  5. I don't see anything different in the upload rules, but I'll be finding out in a couple of weeks when I publish Under Witch Curse. If it doesn't take the file, I'll go back to trying to upload the HTML and letting it covert. I'm not sure how the auto uploader would know it was generated by Calibre or why they would bother to LOOK to see if it was, but anything is possible and if it lacks logic, it's even more possible for a big company to go that route.

  6. All right! I LOVE your Witch books, and I will be the first one to snatch up Under Witch Curse! Please tell me right before you put it out so I can grab a copy! Folks, you should read Maria's Witch books too --

  7. Oh, goodness! Thanks, Frank. I'll be sure to let everyone know--strangers on the street, checkout lady at the grocery and woe to anyone who tries to mug me during book release. They'll be forced to buy a copy even if it's with money from my stolen wallet!!! :>)

    1. Now that's what I call determined marketing!

      I'd make them not only buy a copy but buy another as a gift...