2

Empirical observation has brought me to the conclusion that when I upload book files to CreateSpace (print books), they are best rendered from .pdf files. Kindle (eBook) format, OTOH, turn out better when provided as a .docx file.

Still they are far from perfect, though. I created a book that contains text only - one font for English, and then a different font, and bolded, for the alternating translated-into-Spanish paragraphs. The paperback version looks fine. Here's how it displays:

enter image description here

The Kindle version of the file, though, is "9X Uglier than a Bag of Butts" (or at least plainer than Nebraska):

enter image description here

As you can see, it has no breaks between paragraphs (besides the line break - big whoop!), and does not retain the bold formatting on the Spanish paragraph - or even the chapter heading formatting! The Kindlizing process apparently sees all text as being equal - no special formatting attempted!

So, since the Kindle rendering process obviously does not work well (it was even worse when giving them the same PDF I provided to create the book file - parts of it were missing from the rendered content for some reason), is there a way I can programmatically (in C#) massage a file (either HTML, DOCX, or PDF) that will allow the rendered Kindle file to look like the paperback (retaining paragraph breaks and bold formatting)?

UPDATE

I downloaded Calibre (tried to, that is), put Google blocked it and said the sky is falling, and Calibre would ruin my browsing experience. Dadburn it, if this is legitimate software, why does Google block it?!?

UPDATE 2

I tried using Firefox to download Calibre but, although there was no err msg, it simply wouldn't download the file. So maybe it is also blocking it, but "silently."

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
  • 1
    This is a little broad because it sound like you're looking for a complete conversion program. Based on the [Kindle wikipedia](https://en.wikipedia.org/wiki/Amazon_Kindle) I was wondering if you checked [Calibre](http://www.calibre-ebook.com/). The Wikipedia article also mention the kindle should support a subset of html5 and css3. I assume that should get you going. – rene Jul 23 '15 at 16:02
  • 1
    If you have well formed html document, use [kindlegen](http://www.amazon.com/gp/feature.html?docId=1000765211) to convert it to kindle format. – baf Jul 23 '15 at 22:47
  • What is the definition of "well formed"? Although not Raquel Welch-esque, the HTML file has a Style section (with CSS) followed by HTML (no "HTML" tag or any of that, just simply starts off with

    and goes from there)

    – B. Clay Shannon-B. Crow Raven Jul 23 '15 at 22:51

1 Answers1

2

kindlegen is Amazon's tool for taking input like HTML and transforming it into MOBI files. We've used it in our Rails project with a lot of success in the past, and you can always shell out to the command-line to run it.

Calibre is a third-party tool that takes in a bunch more formats (PDF, EPUB, etc.) and outputs a bunch more formats as well. It's an absolutely legitimate tool that has a command-line interface (ebook-convert) that can be really useful.

For our projects, we weren't able to install Calibre on our CentOS server, so we ended up just using kindlegen and converting HTML files. Actually, to be specific, we took in OPF files with assorted images, html files, toc.ncx files, etc. to create a .mobi file for final publication.

You might want to also look at what fonts are supported on the Kindle and make sure that your fonts and styles are correctly specified. This PDF from Amazon does a pretty good job of describing what CSS is valid.

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76