Kindle Formats, Calibre, Conversions and “The Last Ring-bearer”

I came across a book called “The Last Ring-bearer” (by Kirill Yeskov) recently, and decided it would make a nice addition to my Kindle collection. It’s not sold by Amazon so there’s no Kindle specific format – in fact it isn’t sold by anyone – at least not in Britain – so I needed to convert.

“The Last Ring-bearer” is a story based in the World of “Lord of the Rings”. It is written from the point of view of the Orcs as they battle against the forces of Gandalf as he attempts to banish the arts of Science and Technology; it takes place during the last battle for the Ring and continues into the aftermath. It’s been publishes in many different languages across Europe but has so far avoided Britain due to – probably justified – fears of litigation from the Tolkein estate.

However, it has recently been translated into English (by Yisroel Markov) from it’s original Russian and is available in PDF form. Unfortunately PDF’s are an extremely poor choice for an ebook conversion (and for any conversion actually, they are only meant for printing!).

I tried several methods to convert the PDF’s. First I used Amazons conversion by email: you simply send the PDF as an email attachment and it returns a converted file back, alos via email. This works in that it converts all the text, but it doesn’t appear formatted correctly: text can be in the wrong place, footnotes, headers, page numbers, contents etc. all appear mixed up in the main text. I also tried the PDF conversion in Calibre – an ebook management system I’ve been using for some time – but the same problems occurred. PDF’s are just not compatible with ebook formats.

After some time looking around, I did manage to track down a webpage version of the book which I also tried to convert in Calibre. Unfortunately, the conversion relies on the HTML (the underlying code) being in a good state which wasn’t true in this case and there where again some pretty awful formatting, plus none of the extras I mentioned earlier. However, it is easy to take the text from a webpage so I decided I’d put the formatting in myself.

I use OpenOffice to write my documents so I pasted the text in to a new one. It was a fairly simple procedure to detect the chapters (they all have the word “Chapter” or “Part” in!) and add a heading style to them. Then I pasted the book cover image to the first page. Now, Amazon also have a Microsoft Word Conversion by email, so I gave that a go. It was only slightly better than the PDF conversion. How disappointing. So I turned again to Calibre.

Calibre is able to take in the Original OpenOffice format and turn it into a mobi ebook format. This worked very nicely. With a few test runs I managed to get a nice front cover, the footnotes linking, a full table of contents with links and nicely formatted text (in most cases!). Here’s what I did:

  1. In OpenOffice:
    • Paste an image on the first page, this will be the Book cover (alternatively you can just add some text but an image would be nicer…!)
    • For pages with a small amount of text make sure it’s at (or very near) the top of the page then a page break immediatly after. This avoids lots of white space appearing after converting.
    • Find the Chapter headings and place a heading style on them, preferably in the same hierachy as they appear in the book, Calibre will then recognise them and create a table of contents.
    • Find the footnotes and turn them into proper footnotes by using “Insert->Footnote, EndNote” from the menu.
    • If you have the time, you could also add text-alignment, bold or italic to parts of the text that need it, this will all be preserved in the conversion.
    • You can also add a Table of Contents to the text of the book if you like, just select “Insert->Index Indexs and Tables->Indexs and Tables…”. I’d recommend using just the “entry text” wrapped in Hyperlinks for each level in the “Entries” tab, page numbers won’t mean anything once the conversion completes. (Note also that Calibre will create it’s own Table of contents embedded in the mobi format itself)
    • UPDATED: See below (Change background colors, and font colours)
  2. In Calibre:
    • Now import your OpenOffice document with “Add book”, once done select “Convert book”
    • Update the Title and author fields and any others you might like.
    • Select the “Use cover from source file” if you added some kind of front page to the original document.
    • You shouldn’t need to change anything else so just click OK.

Now just copy it to your Kindle and enjoy.

Update (Feb  20)

The previous mobi version had a white background colour on the text which was causing some issues when the page color was changed from the default (such as in the “Color Mode” of the Kindle App). This seems to be an issue between OpenOffice and Calibre to do with default background-color, I’ve made a bug entry on Calibre here. (And they’ve already fixed it for the next release – nice work!).

For now, when creating a document switch between a colour background then back to “No fill”, this seems to fix it in most cases although there are still some problems. I’ve created a new file with the background changes, see below. I also changed some of the “linking” text to text color black from the default blue.

For reference :

And don’t forget that you can have the original “Lord of the Rings” on your Kindle too, in just a few mouse clicks!

(Voted number one in a BBC poll of the top books of all time.)

Tagged , , , . Bookmark the permalink.

48 Responses to Kindle Formats, Calibre, Conversions and “The Last Ring-bearer”

  1. Simon says:

    The .mobi version and the .odt version seem to be missing all characters with diacritical marks.

  2. James says:

    Nice job Matthew – looks nice on the Kindle, much better than the raw PDF. And I can live without the diacritic marks :-)

    James

  3. Conor says:

    Loss of diacritics is sad, but I’m surprised you did ODT and mobi, but not EPUB! Either way, fantastic that you’re supporting access to this wild translation. Looking forward to finding a suitable version for mobile reading! Thanks again.

    • One of the Kindle’s little annoyances is that it doesn’t recognise epub formats. (For some reason Amazon don’t want you to have access to these popular formats…)

      But look no further, another commenter has produced a epub version too. See Blau’s comment.

  4. sevesteen says:

    Next time you may want to check Briss– http://sourceforge.net/projects/briss/. Cross platform PDF cropping utility. It does a good job of removing the hard line feeds and irrelevant headers and footers. The result is still a PDF, but the cropped version can be converted easily by Calibre with text that will re-flow to fit different sized screens. I haven’t paid attention to what it does to footnotes, so that could still be a dealbreaker in some circumstances.

  5. blau says:

    I did an .epub version based on your .odt (adding a couple links at the beginning)
    http://mauta.net/The-Last-Ring-bearer-Kirill-Yeskov.epub

    • Sounds like good work! (Nice to see the ODT file came in useful.)

      • Conrad says:

        The following changes restore most of the missing diacritics in the ePub version.


        perl -pi -w -e 's/Barad- Dur/Barad-Dûr/g;' *.xhtml
        perl -pi -w -e 's/Barad-Dur/Barad-Dûr/g;' *.xhtml
        perl -pi -w -e 's/...'The World is Text,/...\‘The World is Text,/g;' *.xhtml
        perl -pi -w -e 's/'/\’/g;' *.xhtml
        perl -pi -w -e 's/\`/\‘/g;' *.xhtml
        perl -pi -w -e 's/ "/ “/g;' *.xhtml
        perl -pi -w -e 's/\("/\(“/g;' *.xhtml
        perl -pi -w -e 's/" /” /g;' *.xhtml
        perl -pi -w -e 's/"\n/”\n/g;' *.xhtml
        perl -pi -w -e 's/",/”,/g;' *.xhtml
        perl -pi -w -e 's/";/”;/g;' *.xhtml
        perl -pi -w -e 's/"\)/”\)/g;' *.xhtml
        perl -pi -w -e 's/N menor/Númenor/g;' *.xhtml
        perl -pi -w -e 's/N rnen/Núrnen/g;' *.xhtml
        perl -pi -w -e 's/Amon Sul/Amon Sûl/g;' *.xhtml
        perl -pi -w -e 's/Amon S l/Amon Sûl/g;' *.xhtml
        perl -pi -w -e 's/E:o/Éo/g;' *.xhtml
        perl -pi -w -e 's/Grima/Gríma/g;' *.xhtml
        perl -pi -w -e 's/alant r/alantír/g;' *.xhtml
        perl -pi -w -e 's/D nada/Dúnada/g;' *.xhtml
        perl -pi -w -e 's/D nedain/Dúnedain/g;' *.xhtml
        perl -pi -w -e 's/L rien/Lórien/g;' *.xhtml
        perl -pi -w -e 's/powers-that- be/powers-that-be/g;' *.xhtml
        perl -pi -w -e 's/An rien/Anórien/g;' *.xhtml
        perl -pi -w -e 's/azg l/azgûl/g;' *.xhtml
        perl -pi -w -e 's/Touch No!/Touché!/g;' *.xhtml
        perl -pi -w -e 's/lady- in-waiting/lady-in-waiting/g;' *.xhtml
        perl -pi -w -e 's/fianc No/fiancé/g;' *.xhtml
        perl -pi -w -e 's/prot Nog No/protégé/g;' *.xhtml
        perl -pi -w -e 's/step- three/step-three/g;' *.xhtml
        perl -pi -w -e 's/F Noanor/Fëanor/g;' *.xhtml
        perl -pi -w -e 's/Nomigr No/émigré/g;' *.xhtml
        perl -pi -w -e 's/m makil/mûmakil/g;' *.xhtml
        perl -pi -w -e 's/m mak /mûmak /g;' *.xhtml
        perl -pi -w -e 's/caf No/café/g;' *.xhtml
        perl -pi -w -e 's/d Noclass No/déclassé/g;' *.xhtml
        perl -pi -w -e 's/Khand- related/Khand-related/g;' *.xhtml
        perl -pi -w -e 's/Ephel D ath/Ephel Dúath/g;' *.xhtml
        perl -pi -w -e 's/E rendur/Eärendur/g;' *.xhtml
        perl -pi -w -e 's/L thien/Lúthien/g;' *.xhtml
        perl -pi -w -e 's/sans r proche/sans reproche/g;' *.xhtml
        perl -pi -w -e 's/Tzagan- Tzab/Tzagan-Tzab/g;' *.xhtml
        perl -pi -w -e 's/no- go/no-go/g;' *.xhtml
        perl -pi -w -e 's/twenty- seventh/twenty-seventh/g;' *.xhtml
        perl -pi -w -e 's/G- mandate/G-mandate/g;' *.xhtml
        perl -pi -w -e 's/to cal then Mountains/to call them Mountains/g;' *.xhtml
        perl -pi -w -e 's/And ril/Andúril/g;' *.xhtml
        perl -pi -w -e 's/werewolves-nin/werewolves -- nin/g;' *.xhtml
        perl -pi -w -e 's/counter- spy/counter-spy/g;' *.xhtml
        perl -pi -w -e 's/Sharya- Rana/Sharya-Rana/g;' *.xhtml

  6. Mark says:

    The .mobi/Kindle version seems to have a permanent white background on all of the text disallowing use of the alternate color schemes (I use white on black because of light sensitivity).
    Would there be a way to undo this so it works with the color schemes?

    • Hi. This isn’t something I chose to add in when I created the file. Which hardware are you using to invert the text?

      • Mark says:

        I’m using the official Kindle App on my Mac, but I’m seeing the same result on the official Kindle app on my iPhone.
        However the text on the iPhone app is not actually changed to white but a gray, so you can still make out the letters, but it’s still highlighted with white.
        The color theme options are a function of the kindle app (white, black & Sepia) on both the Mac and iPhone not. The white highlight is also seen in the Sepia theme.

        • There’s some issues between OpenOffice and Calibre.

          It looks like Calibre is looking for a background colour for the text in the Document but if there isn’t anything set it chooses a white background.

          Interestingly when a file is created in OpenOffice it doesn’t set anything as the background colour – not even “No Colour” .

          You can fix this by manually selecting the text and choosing “No Fill”. I’ll try to get a new file up later today.

  7. Kate says:

    Has anyone else had problems with the Kindle for Android (v2.0.4.103870164) failing to open the .MOBI format file that’s linked above? All I get is white bars where text should be. Calibre opens the .MOBI file just fine, and I’m trying to use Calibre to re-convert the document.

    • Mark says:

      Kate, see my comments above. It sounds like you’re using a white text on black background theme yes? Try it with the white background and black text and you should be able to read it.
      It does seem to be the .mobi file itself as I’m seeing it on both my Mac and iPhone (and you on your Android).
      I was going to try the same thing with Calibre as well. I’d be curious about your results.

  8. Pingback: Tweets that mention Kindle Formats, Calibre, Conversions and “The Last Ring-bearer” | Live.Hack.Learn.Blog() -- Topsy.com

  9. Pingback: Booksprung » Russian novel retells “The Lord of the Rings” from the bad guys’ POV

  10. Pingback: Ebook rivisitato del signore degli anelli |

  11. Mark Valley says:

    Is seems to be a nice story! I’ve downloaded that for my kindle and will read as soon as i finish Cornwell stuff.

    Thanks!

  12. Alastair says:

    Came here looking for stuff on TwentyTen header rotation and stumbled across this, lovely stuff. I had the PDF version & wanted to read it on my Kindle – thanks for saving a lot of hassle on the conversion.

  13. Bhagwad Park says:

    Thank you so much! I’ve always had no end of trouble converting PDF files for my iPod Touch and Kindle. I wish people would stop using PDF as the primary ebook format of choice!

  14. Thomas B. Pryor says:

    Thanks. I was struggling to reformat The Last Ring-bearer” for my Kindle (the pdf type size was uncomfortably small) and luckily stumbled onto this website, which readily solved the problem. TBP

  15. Pingback: Book Review: The Last Ringbearer by Kirill Eskov

  16. blau says:

    @Peter Tupper: have you tried scrolling down a couple of (white) pages? The epub seems fine to me.

    • Glenn says:

      The problem seems to be that the Perl expressions ‘educate’ (make curly) the single and double quotes inside the XML tags. Here’s some Perl that does the ‘right’ thing:

      perl -pi -w -e 's/Barad- Dur/Barad-Dûr/g;' *.html
      perl -pi -w -e 's/Barad-Dur/Barad-Dûr/g;' *.html
      perl -pi -w -e "s/\.\.\.'The World is Text,/...\‘The World is Text,/g;" *.html
      perl -pi -w -e 's/"\.\.\./“.../g;' *.html
      perl -pi -w -e "s/'/\’/g;" *.html
      perl -pi -w -e 's/\`/\‘/g;' *.html
      perl -pi -w -e 's/"(\W)/”$1/g;' *.html
      perl -pi -w -e 's/"/“/g;' *.html
      perl -pi -w -e 'while (s/(<[^>]*?)“/$1"/g) {}' *.html
      perl -pi -w -e 'while (s/(<[^>]*?)”/$1"/g) {}' *.html
      perl -pi -w -e 'while (s/(<[^>]*?)’/$1"/g) {}' *.html
      perl -pi -w -e 's/N menor/Númenor/g;' *.html
      perl -pi -w -e 's/N rnen/Núrnen/g;' *.html
      perl -pi -w -e 's/Amon Sul/Amon Sûl/g;' *.html
      perl -pi -w -e 's/Amon S l/Amon Sûl/g;' *.html
      perl -pi -w -e 's/E:o/Éo/g;' *.html
      perl -pi -w -e 's/Grima/Gríma/g;' *.html
      perl -pi -w -e 's/alant r/alantír/g;' *.html
      perl -pi -w -e 's/D nada/Dúnada/g;' *.html
      perl -pi -w -e 's/D nedain/Dúnedain/g;' *.html
      perl -pi -w -e 's/L rien/Lórien/g;' *.html
      perl -pi -w -e 's/powers-that- be/powers-that-be/g;' *.html
      perl -pi -w -e 's/An rien/Anórien/g;' *.html
      perl -pi -w -e 's/azg l/azgûl/g;' *.html
      perl -pi -w -e 's/Touch No!/Touché!/g;' *.html
      perl -pi -w -e 's/lady- in-waiting/lady-in-waiting/g;' *.html
      perl -pi -w -e 's/fianc No/fiancé/g;' *.html
      perl -pi -w -e 's/prot Nog No/protégé/g;' *.html
      perl -pi -w -e 's/step- three/step-three/g;' *.html
      perl -pi -w -e 's/F Noanor/Fëanor/g;' *.html
      perl -pi -w -e 's/Nomigr No/émigré/g;' *.html
      perl -pi -w -e 's/m makil/mûmakil/g;' *.html
      perl -pi -w -e 's/m mak /mûmak /g;' *.html
      perl -pi -w -e 's/caf No/café/g;' *.html
      perl -pi -w -e 's/d Noclass No/déclassé/g;' *.html
      perl -pi -w -e 's/Khand- related/Khand-related/g;' *.html
      perl -pi -w -e 's/Ephel D ath/Ephel Dúath/g;' *.html
      perl -pi -w -e 's/E rendur/Eärendur/g;' *.html
      perl -pi -w -e 's/L thien/Lúthien/g;' *.html
      perl -pi -w -e 's/sans r proche/sans reproche/g;' *.html
      perl -pi -w -e 's/Tzagan- Tzab/Tzagan-Tzab/g;' *.html
      perl -pi -w -e 's/no- go/no-go/g;' *.html
      perl -pi -w -e 's/twenty- seventh/twenty-seventh/g;' *.html
      perl -pi -w -e 's/G- mandate/G-mandate/g;' *.html
      perl -pi -w -e 's/to cal then Mountains/to call them Mountains/g;' *.html
      perl -pi -w -e 's/And ril/Andúril/g;' *.html
      perl -pi -w -e 's/werewolves-nin/werewolves -- nin/g;' *.html
      perl -pi -w -e 's/counter- spy/counter-spy/g;' *.html
      perl -pi -w -e 's/Sharya- Rana/Sharya-Rana/g;' *.html

      The resulting epub works in iBooks as far as I can tell. When I finish reading the book, I’ll try to remember to fix any further errors and repost.

  17. keleig says:

    Hi blau,

    I was having the same problem as GeneE, but your new version works great (so far).

    Thank you!

  18. Stephen R says:

    Hi — It looks as though you got the conversion pretty well figured out, and I want to thank you for your efforts. (THANKS!) I just wanted to ask — did it ever occur to you to contact the translator and ask him for a non-PDF file? He seems to support your conversion, considering he links to it from his site; perhaps he could have saved you some work.

    So… did you ever get the issues worked out on the diacriticals?

    • I didn’t. But the purpose of this blog was to help with conversions in general, given available material. (I actually wasn’t aware the author had linked to my blog)

      The diachritics are not a problem usually, just in this specific case. I’ve updated the Kindle version with some of the improvements suggested in the comments. This version should be much more character complete.

  19. Jack Smith says:

    the calibre seems quite helpful for conversion but it needs more editing and formatting i came to know when i ordered my book through http://www.ebookconversion.com/

  20. David Petersa says:

    Hello,
    I tried to download the link on the last post (http://mauta.net/The-Last-Ring-bearer-Kirill-Yeskov.epub), but the file is no more available. Is it possible to make this file available again?
    Thank you very much!

  21. blau says:

    Hi, I’m mauta.net, and am sorry to confirm that the site and the file have been dismantled. However, the good news is that a new revised english translation has been made available by Markov, in a nice pdf, epub and mobi format ready for download. Please see here:

    http://ymarkov.livejournal.com/280578.html

  22. Rob says:

    Another good tool to generate ebooks is Sigil, http://code.google.com/p/sigil/. It won’t do conversion but if you are reformatting the text anyway it is a good way to generate an EPUB file to then convert using calibre to the form you need.

  23. macineely says:

    Thanks,I wanted to get The Last Ringbearer for my kindle but didn’t know how.

  24. Vítor De Araújo says:

    Thanks for taking the effort of doing this!

Leave a Reply

Your email address will not be published. Required fields are marked *

To comment, click below to log in.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>