Sunday, February 22, 2015

Kindlegen - Convert EPUB to Kindle MOBI



In trying to expand my Kindle library, I have found that most e-books, or magazines, found online come in PDF format. PDF is not supported on the Kindle and wouldn't read well on the tiny screen, due to PDFs not being designed to reflow the text on a smaller screen. A few e-books will actually come in the e-book reader friendly format, .epub (Electronic Publication), which does support reflow. The trouble is that Kindle doesn't support the EPUB format. Kindle only naively supports the .mobi (Mobipocket) format (and a few other archaic proprietary formats).

Luckily, I was able to use the free Kindlegen, provided by Amazon, to convert the .epub e-book. Kindlegen is supported on Windows, OSX, and Linux.  Kindlegen is a command line tool, but is fairly simple to use. Be aware that the generated .mobi file will be significantly larger than the EPUB format (about 2x-3x larger).

Kindlegen can convert the following formats to the .mobi format:
  • .opf
  • .htm
  • .html
  • .epub
  • .xhtml
  • .zip
  • directory source files
The only trouble I ran into, during conversion, is you have to specify the full path to the file you are converting. If you don't specify the full file path, even though the file is in the same folder, you will get an error about not finding the file specified. You may also notice the .mobi file is built with warnings, due to missing desired headers, but those can generally be safely ignored.

Converting an .epub book to mobi:

C:\temp>kindlegen.exe "c:\temp\pg11.epub"

*************************************************************
 Amazon kindlegen(Windows) V2.9 build 1029-0897292
 A command line e-book compiler
 Copyright Amazon.com and its Affiliates 2014
*************************************************************

Info(prcgen):I1047: Added metadata dc:Title        "Alice's Adventures in Wonderland"
Info(prcgen):I1047: Added metadata dc:Date         "2008-06-27"
Info(prcgen):I1047: Added metadata dc:Creator      "Lewis Carroll"
Info(prcgen):I1047: Added metadata dc:Subject      "Fantasy"
Info(prcgen):I1047: Added metadata dc:Rights       "Public domain in the USA."
Info(prcgen):I1047: Added metadata dc:Source       "http://www.gutenberg.org/files/11/11-h/11-h.htm"
...
Info(prcgen):I1037: Mobi file built with WARNINGS!

Converting an html book to .mobi:
C:\temp>kindlegen.exe "c:\temp\Alice's Adventures in Wonderland, by Lewis Carroll.htm" -o alice.mobi

*************************************************************
 Amazon kindlegen(Windows) V2.9 build 1029-0897292
 A command line e-book compiler
 Copyright Amazon.com and its Affiliates 2014
*************************************************************

Info(prcgen):I1047: Added metadata dc:Title        "
      Alice's Adventures in Wonderland, by Lewis Carroll
    "
Info(prcgen):I1002: Parsing files  0000002
Warning(htmlprocessor):W28003: Value specified for CSS property in content is not supported by Kindle readers. Please re
fer Kindle Publishing Guidelines about usage of property: 'position: absolute' in file: c:\users\kenneth\documents\Alice
's Adventures in Wonderland, by Lewis Carroll.htm
...
Info(prcgen):I1037: Mobi file built with WARNINGS!





14 comments:

usps tracking said...

I have read through other blogs, but they are cumbersome and confusing more than your post. I hope you continue to have such quality articles to share with everyone! I believe a lot of people will be surprised to read this article!

Ray56 said...

This forum is a revelation, I love to read on these topics!

jackman10 said...

Regular text editors can't handle the task of altering files in Portable Document Format files because of the greater complexity of this format, so you need to find a more advanced solution like airslate.com/product/pdf-editing. It's more than just an online PDF editor.

robinjack said...

Substantially, the article is really the freshest on that valuable topic. I match in with your conclusions and definitely will eagerly look forward to your next updates. Saying thanks definitely will not just be acceptable, for the amazing clarity in your writing. I will certainly immediately grab your rss feed to stay privy of any updates. Authentic work and also much success in your business efforts! buy 4D online in Malaysia

jackman10 said...

This time I have learned a lot from this site, especially from https://www.signnow.com/ask/how-to-copy-and-paste-an-electronic-signature-to-a-pdf-in-signnow. This post was brief but had a lot to teach. I will share it even further.

jackman10 said...

Looking to spy on your wife?  there are so many spying apps available in the market. But this article on how to catch wife how to catch wife cheating on cell phone cheating on her cell phone is very different. You should check it out.

jackman10 said...

This website called www.signnow.com/ask/how-to-sign-a-pdf-that-has-already-been-signed-by-someone-else was recommended to me by a friend. And I have to admit, that was the best advice I've ever received. I now use it on a daily basis!

jackman10 said...

Generating documents is something I didn’t know about. And I learned all about it from airslate.com/product/document-generation. This post have been of a great help to me.

jackman10 said...

I am sure you'll enjoy the latest post on this site as it is all you asked for. The content on www.signnow.com/how-to-esign-a-pdf is very much reliable and it is good. Have a look at it.

jackman10 said...

Wordpress is a key element and has helped a lot of students in starting their small setups. To get to know more about marketing strategies it is better to visit four-top-tier-e-signature-solutions-which-program-is-best-to-use-when-signing-a-pdf. They are giving best tips gotten from the experts.

jackman10 said...

Definitely one of my favourite platforms is this website called airslate.com/product/contract-management. The reason is the quality of service which they provide is the best part of it. No cons at all!

jackman10 said...

Well there is not much to read here and I was very excited. I was told that I'd find detailed content on Uploaded Files Integration Bots here. But I didn’t.

jackman10 said...

With signnow.com/ask/how-do-i-send-a-contract-via-email-with-an-electronic-signature-applied, creating a form or contract that can be electronically signed has never been simpler. All you need now, thanks to years of process improvement, is an internet connection, a smartphone touchscreen, or a keyboard and mouse.

jackman10 said...

In all honesty, I'll cast my vote in favour of this airslate.com/bots/slack agenda. What I like the most about them is the excellent service they provide. I'm very happy with this one!