Sunday, May 25, 2014

Kindlegen "-dont_append_source" Option

I discovered this week that there is a command line option for Kindlegen that keeps the source file zip from being added to the compiled mobi archive. It was hidden in the Kindle Publishing Guidelines under the "Building Dictionaries" section (7.5), appearing first in Version 2014.1 back in January, and was not specifically listed in the Revision History, where it simply said "Dictionary Overview (and all subsections of same)." I went through that section, noting all the changes but this one. Go figure.

At any rate, if you add this option to your kindlegen command it will bypass the addition of the source file archive to your output file:
-dont_append_source
Kindlegen will output this message as the first line in the conversion log:
Info:I9018:option: -donotaddsource: Source files will not be added
I tested a fixed layout file to be sure it worked, and what I found was that a 19.6 Mb source epub which normally converts to a 44.9 Mb file, resulted in a 25.2 Mb mobi when appending this conversion option. Extracting the contents using KindleUnpack showed that the source zip file was indeed absent.

So for those who have been using KindleStrip to remove the bulky source files from your files, you can now just add this option during conversion instead. KindleStrip is no longer necessary.

Bear in mind, however, that with the larger image file size allowance, if you're including higher resolution images for HD devices that are over the standard definition limits (i.e. 127/256/800 kb), these source files may be required by Amazon in order to send them to the end user's HD device.