Managing File Sizes for Ebooks

The majority of fiction writer/publishers will not run into overall file size problems. Text doesn’t create monster files. Using graphics or illustrations can add significantly to the overall file size, but I’ve yet to create an ebook that exceeds –or even comes close to–Amazon’s 50MB limit (which may be changing due to the introduction of the new Fire HD tablets). Even with illustrations and graphics, I do my best to keep the overall file size under 5MB because of Amazon’s delivery fees ($.15 per MB). Those fees are charged against the publisher and can eat up royalties quickly.

As I said, most fiction writer/publishers will not run into problems with overall file size.

Where fiction writer/publishers do run into problems are with the size of individual chapter files within the ebook. When you use <h1> or <h2> tags in html, or the Heading 1 or Heading 2 style in a word processor, you are alerting the conversion programs (such as Calibre or KindleGen) that this is a new chapter and should be split into a new file.* If you don’t use the headings or tags, the conversion programs look for certain words–Chapter, Part, Section, etc.–to determine where the file should be split. What is NOT reliable at all is using page breaks (in a word processor) or the “page-break-before” command in html/CSS. (I have absolutely no idea why those work sometimes, but sometimes they don’t–my best guess is the whims or moods of the Digital God.)

I always split html (text) files into chapters or parts, which manages the overall ebook very nicely. Even though this example is from a novel (Prophet of Paradise by J. Harris Anderson) that is almost 200,000 words long, notice the size of the individual chapters:

File Size

What happens if you don’t use tags or headings and your chapters have titles the conversion programs don’t recognize? What happens if you don’t have chapters at all and your ebook is deliberately one long tract? If it runs up against the 300KB file size limit (approximately 45,000 words), several things could happen:

  • Your file fails to convert
  • The conversion program inserts page breaks whether they are appropriate or not
  • The file converts, but some devices tell the user the ebook can’t be loaded

If your files are less than 300KB, but still largish (over 150KB) your readers could experience serious screen lag as they page through your story. This is an important consideration for genre fiction writers since the chances are your readers are Super-Readers and might have hundreds or even thousands of ebooks loaded on their devices. They will not be happy if your file sizes and their addiction cause several seconds of lag every time they “turn” the page.

What to do?

  • If you are using a word processor to style your ebooks, use the Heading 1 and Heading 2 styles for your chapters, parts and sections. (Do NOT depend on the conversion programs to recognize your inserted page breaks!)
  • If you are styling in html, use the <h1> and <h2> tags.
  • If your project does not have natural breaks such as chapters or parts (it’s long short story or novella) consider a minor restructure. Use the page count as your guide and try to find natural breaks around the 15,000 word mark–a scene break or time or pov shift or even an illustration that sits on its own “page”.

* If you are using Calibre to convert your ebooks, you can check the file splits in Calibre’s EPUB editor. You’ll see the list of individual text/html files and can open each one on the viewer/edit screen. If you are experiencing inappropriate page breaks, you can manage the fixes in the editor.

 

 

Advertisements

I Don’t Hate Calibre, But…

duck coverJudging by the heated storm I roused the last time I criticized Calibre it’s probably a mistake to do so again. What the hell. I have to say it:

DO NOT USE CALIBRE TO CONVERT YOUR EBOOKS FOR THE PURPOSES OF SELLING THEM ON AMAZON.

Yesterday I did a troubleshoot and repair on a writer’s ebook. The EPUB she had converted from Word via Calibre was perfectly fine. It was a valid EPUB, and it displayed the way it should on both Calibre and Adobe Digital Editions. Problems arose when she converted the EPUB into AZW3 and MOBI. The ebook worked when she loaded it onto her Paperwhite Kindle, though it had some disturbing issues. Amazon rejected the file outright.

I took her EPUB and ran it through the Kindle Previewer to see what the problem was. It converted with WARNINGS (never want to see that). The ebook opened, but the button under Devices for Kindle for iOS was greyed out. And the cover didn’t display. When I loaded it on my Paperwhite, some of the user controls were locked. I then went back and looked inside the EPUB. The Calibre conversion had declared font-families–Georgia and Times New Roman–neither of which display on Kindles, but they aren’t ignored either, and hence cause all sorts of interesting little problems. Plus, it had built a cover page.

I’m not a techie person, so I don’t know if I can explain it adequately, but I will try. When a file is uploaded to Amazon it converts the source file into a 3-in-1 ebook. If you’ll compare the size of an EPUB to a Kindle, you’ll notice that the MOBI file is about 3 times bigger than the EPUB. The ebook you buy from Amazon will work across several types of devices: e-ink readers, Fire tablets, and a variety of apps, including iOS for Apple. This is tricky stuff. While Calibre can and does convert your files into the MOBI format or AZW3 format, and the files are suitable for personal use, they aren’t suitable for commercial use because the probability is about 97.3% that an ebook converted through Calibre and then uploaded to Amazon will be broken.

This is all about Amazon. They have proprietary platforms and they are constantly updating and improving and tinkering and it’s difficult for outsiders to keep up. Calibre is a library management tool, not a commercial conversion tool. They can’t be expected to stay ahead of the Amazon updates and bugs. That’s not their purpose.

The fix for the writer’s problem ebook was fairly simple. I removed the font-family declarations, removed the cover page, added a line of code to the metadata in the content.opf so Amazon knew the cover was in the file, resized the cover and ran it through the Kindle Previewer. Voila! Everything worked the way it should. The writer was able to upload the file to Amazon with no problems.

My recommendation to the writer for future projects was this: continue using Calibre to convert her Word files to EPUB files since there appear to be no problems and her ebooks are working fine. But, then to refresh her knowledge about using stylesheets in Word via Mark Coker’s Smashwords Style Guide, and direct load her Word file to Amazon. It’s a bit of a pain since you can’t examine and adjust the file before you start the uploading process, but you can take full advantage of the previewer at Amazon and make sure everything works before you hit the Publish button. That way there won’t be any extraneous items like cover pages and “embedded” fonts to muck up the works.

So seriously, folks, don’t kill the messenger or throw rotten tomatoes. This is just the reality. Calibre is not the right tool for converting files to sell on Amazon. Use the program for what it’s intended–managing your ebook library–and find other means to deal with Amazon.