Friday, October 14, 2011

ebook format conversion

A lot of you have used calibre to convert your ebooks between different formats. The calibre conversion system is very sophisticated and has many subtleties. Today I will discuss just a few features that are often overlooked and yet a lot of you may find very useful. The following is the "Convert books" icon in the top main calibre tool bar:



Bulk convert:
Calibre allows you to convert books in bulk. You can select a set of books, all of which may or may not be in the same format, and convert them all in bulk to a different format. So say you have a kindle and you have a number of books in EPUB, RTF and PDF formats. You can select them all. Then click the "Convert books" icon or click the little arrow next to the "Convert books" icon and choose the option "Bulk convert". A new window  opens. At the top right corner of the window you can set the output format, which in this case would be MOBI.

calibre allows you to choose various settings for the conversion output. A few of these are discussed below. When you select a book and click the "Convert books" icon  in the top tool bar a new window opens. On the left of the window is a menu with a number of entries.

Smart Punctuation: The second entry in the menu is "Look and Feel". When you select it on the right you will see a number of options to customize the look and feel of the output of the conversion. Under the section called "Text justification" there is an entry called "Smarten punctuation". When this is selected before the conversion, all plain quotes, dashes and ellipsis are converted to their typographically correct equivalents. For example, plain quotes to curly quotes. You can do the reverse by clicking "Unsmarten punctuation"

Page Setup: The fourth entry in the menu is "Page Setup". This option allows you to optimize the conversion output for a particular device, specifically the image sizes so they fit well on the screen of the device. So say you have a Kindle, then you would choose "Kindle" in the list of "Output Profiles" that appear when "Page Setup" is selected. Say you have converted all your ebooks for your Kindle and stored them that way, and now you have bought an iPad. To optimize the output for ebooks converted to EPUB for the iPad from MOBI for the Kindle, select "Kindle" in the list of "Input Profiles" and "iPad" in the list of "Output Profiles".


Covers and Metadata: The fifth entry in the menu is "Structure Detection". When you select it on the right side you will see the option called "Insert metadata as page at start of book". Selecting it will include the metadata at the beginning of your ebook itself, including reviews if they are available. Suppose you do not want to convert the ebook to a different format but want to include the metadata and cover within the ebook, then just select the same formats for the input and output during conversion with the "Insert metadata as page at start of book" option checked. See figure below for an example. The metadata along with a choice of covers for an ebook can be obtained by selecting the ebook and clicking the "Edit metadata" button in the top main calibre tool bar.


Some ebooks have an image as a cover which is not explicitly marked as the cover. Instead it is just another image in the ebook. In this case when you convert the book in calibre, the output may have two covers. If this happens, re-do the conversion with the "Remove first image" option (above the "Insert metadata as page at start of book") selected. This will give you an ebook with just one cover.

MOBI Table of Contents: For the specific case of converting to MOBI, the eighth option on the left menu is "MOBI output". For MOBI output calibre generates a Table of contents (TOC), which is inserted by default at the end of the ebook. When the "MOBI output" option is selected in the left menu you can choose "Do not add Table of Contents to book" if you do not want the TOC or choose "Put generated Table of Contents at start of book instead of end" if you want the TOC at the beginning of the book. The TOC calibre generates is hyperlinked to the chapters.

53 comments:

  1. er -- it's 'format', not 'fomat'. But thanks for all the good work!

    ReplyDelete
  2. Great Post. But I need some help - my PDFs never generate a TOC when converted to Mobi. Is there a special way of doing this or am I doing something wrong?

    ReplyDelete
  3. @JonJ: Thanks for pointing that out :) fixed it now

    ReplyDelete
  4. @Efi & Eti Paz: Yes when you convert from pdf it is complicated to generate a TOC. There is no simple formula for it. For more info see http://manual.calibre-ebook.com/conversion.html#table-of-contents

    ReplyDelete
  5. Hi!
    I Had a question: How to we set the output directory of the converted book?
    I also have a problem: When I convert the books, Calibre's log says that the outputted file is written to a directory (somewhere in appdata) but when I go there, it's not there! only the individual parts are in existence!
    The interesting thing is that in the process of converting, the pdf file is created, but when its finished, it gets deleted for some reason!
    Can you help me out with this?

    ReplyDelete
  6. I have converted from html to mobi and everything works well except the table of contents at the end of the book has the chapter headings which are hyperlinked but there is the word 'untitled' under each heading which is alos hyperlinked to the same place as the chapter heading above it. There is also the table of contents at the behinning of the book which I had in the cocument before the conversion. It is also hyperlinked and works fine. How do i get rid of the words 'untitled'?
    Thanks

    ReplyDelete
  7. Thank you for posting the great post …I was looking for something like this…


    iPad 3 Pouch Cases

    ReplyDelete
  8. Hello,
    I have a big problem: 2 pages odt-document, on page 2 1 picture.
    Calibre (0.9) uses for default this picture on page 2 of my cover and removes this picture from my ebook. Independed of structure setting "remove first picture" - picture will be removed.
    I tried another way: load empty book, defining frist a cover-picture, then load my odt and convert to epub...
    same proble, my pictur on page 2 ist removed! The hole day i tested... bug ????
    Hans

    ReplyDelete
    Replies
    1. The first image in an ODT file is used as the cover, sice ODT has no
      cover metadata. If you dont want it used as a cover insert a 600x800
      dummy image at the start of your ODT.

      Delete
  9. I'm new to calibre and finally figured out how to install the plug-ins (phew!). When I convert to pdf, the font is huge! A 600 page book becomes a 2020 page document. Do I have any control over that?

    ReplyDelete
    Replies
    1. I am having the same issue and cannot figure out how to fix it. Any idea?

      Delete
    2. The first, most important, setting to decide on when converting to PDF is the page size. By default, calibre uses a page size defined by the current Output profile. So if your output profile is set to Kindle, calibre will create a PDF with page size suitable for viewing on the small kindle screen. However, if you view this PDF file on a computer screen, then it will appear to have too large fonts. To create “normal” sized PDFs, use the Override page size option under PDF Output in the conversion dialog.

      Delete
  10. I used to convert with Calibre, but I recently discovered an online converter, like http://kitpdf.com Right now this is what I use to convert pdf files to mobi or epub. Hope you like it! :)

    ReplyDelete
  11. Why the hell is TOC at the END of the book the default? TOCs have been at the beginning of books for... ever...

    ReplyDelete
    Replies
    1. Please see http://manual.calibre-ebook.com/faq.html#what-s-the-deal-with-table-of-contents-in-mobi-files

      Delete
  12. Hello! I have a problem with Calibre. Why Calibre do not recognized the romanian diacritics (șțăîâ). Adobe recognizes but Calibre not.

    ReplyDelete
  13. Can someone please help me, I am tearing my hair out. I have a butt load of books that I want to upload to my kindle, and I have downloaded the Calibre software. HOWEVER, despite how many time or different ways I do it, I cannot get the cover to show in the kindle. For example, if I load the book directly, and the cover is there, but the author and the title are the wrong way round, or missing or whatever, I add it to Calibre, tick the box that says "Use cover from source file" correct what needs correcting, and then convert to MOBI, or MOBI to MOBI as is usually the case. Then I re-upload it to my kindle, and low and behold, the author and title info is all correct, but no cover. The cover is inside the book. Jut not on the front of it. I know this shouldn't matter, but Im a bit OCD and I want the covers too! Helllllllllllllp!!!!!!!!!!

    ReplyDelete
    Replies
    1. I had the same issue when generating MOBI files. Try to convert the book to PRC format. Kindle reads it natively, so you should not have a problem with that. It worked for me!

      Delete
    2. Alternatively, use the "Polish" function to update metadata and the cover in your book files.

      Delete
    3. In calibre, go to Preferences->Output Options->MOBI output and setting the “Enable sharing of book content” option.
      Any doubts skywaybpo@gmail.com

      Delete
  14. Is it possible to insert images into the "comment" section of the metadata?

    Whenever I edit metadata for an ebook, I'll often add reviews from goodreads, including the average rating, which is in the form of an image of stars. I also will sometimes add info from Wikipedia, if the book is about a specific historical person- and with the text from Wiki, I'll often times I add the images in the Wiki post. I'm often off-grid, and having that info saved to the book makes it much easier to refer to when I can't get online.

    The images will show when I paste them in the metadata "comments"- then I convert the ebook (epub to epub), to insert the metadata in the beginning of the book. But then the images disappear- only the text shows in the ebook, when viewing it on the device, or in calibre using the "ebook viewer".

    Yet, when I highlight a book in Calibre, and it shows the cover and metadata in the right hand column, the images and the text show up (the cover image does, but not the images I inserted into the metadata "comments" section).

    Is there a way to make both images and text show up in the ebook too? And if not, why is it still showing the images in the right column when I highlight the book in calibre?

    Any input would be hugely appreciated. If it's not possible to insert images into the metadata comments, is there another way to use Calibre that would let me add text and images to the ebook?

    ReplyDelete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Calibre is indeed very nice tool for conversion of ebooks. This Calibre is very simple and result oriented. I found it when I was looking for ePub to iPad Conversion I read many positive reviews about it online.

    ReplyDelete
  17. Where do I find the simple stuff - like "What do I do to retain my formatting (and not have my PDF reformatted by Calibre)?"

    ReplyDelete
    Replies
    1. please see http://manual.calibre-ebook.com/conversion.html#pdfconversion

      Delete
  18. This comment has been removed by a blog administrator.

    ReplyDelete
  19. I would like to know how I can specify the page where the eBook should open. Can anybody help me with that?

    ReplyDelete
  20. I hope you can help me.. I'm trying to convert a Kindle Book to ePub but the TOC has issues. If I open the eBook in Adobe Digital Editions, the TOC shows up just fine, but if I try it on Kobo reader, it shows up as links with generic "id##" names instead of the actual chapter names. In Google Play Books the TOC won't even show up! :(

    ReplyDelete
  21. how to import marc 21 format metadata.?
    pls help me.

    ReplyDelete
  22. we have more than 10,000 marc 21 forrmat e books. pls help me to import into calibre.

    ReplyDelete
  23. i have a problem, whenever i convert mobi documents to epub pages are always missing

    ReplyDelete
  24. When I convert a PDF to ebook format, there is a change in number of pages. How will I get the exact same number of pages in ebook format as in PDF. Please help...

    ReplyDelete
  25. Any one please tell me how i convert the text image file into only text(notepad) format..please email me(vishu.somesh@gmail.com)

    ReplyDelete
    Replies
    1. calibre cannot convert image files.

      Delete
  26. I imported "The Richard Burton Diaries" into Calibre. It appears this book (in EPUB) has everything in 2-fold (contents, pictures, text). That's why it has over 3,900 pages! Converted it to MOBI, but no difference. Can I delete pages in Calibre? A big job, but worth it. Thanks.

    ReplyDelete
  27. When I convert epub to pdf, the font is so huge! How can I make it smaller? Thanks.

    ReplyDelete
    Replies
    1. When you click convert a window opens wher eyou choose pdf to be the output format. In the left column of that window is a menu wjere you can select pdf output. Then on the right you will see options for paper size and font size. choose them appropriately for your reader.

      Delete
  28. Hi, When you bulk convert does it skip over books if there is already one of that format. For instance I have pdf, chm and epub in my library. Some of the books have two formats, pdf and epub or chm and epub. I want to convert my entire library so everything is in epub, but would like to avoid duplication if I can.

    Thank you for the great product. I used to hate epub, but since I got this e-ink reader the epubs are such a pleasure to read.

    ReplyDelete
    Replies
    1. In the search bar type

      not formats:epub

      Then bulk convert all the remaining books.

      Delete
  29. I've never got batch convert to work. It simply takes forever on the first book and never progresses. I'm trying to convert from epub to mobi.

    ReplyDelete
    Replies
    1. seems like the problem is with the first book. Post a bug report about it at http://calibre-ebook.com/bugs but be sure to include all the information and files requested in http://www.mobileread.com/forums/showthread.php?t=186697

      Delete
  30. I've converted some books to ePub and PDF. For the output profile, I'm selecting 'Galaxy' (closet to my 1280x800 screen). On the ePub, the font is fine and readable. In the PDF version, the font 'feels softer' and is not as 'readable'.

    I'm reading both on a 1280x800 screen Win tablet.

    Is there anything I can do to increase the readability of fonts in the PDF output? Thanks.

    ReplyDelete
    Replies
    1. No idea what you mean by 'feels softer'. You can open a bug report at http://calibre-ebook.com/bugs and we can look into it. but we will need more information. please include all information and file attachments requested in http://www.mobileread.com/forums/showthread.php?t=186697

      Delete
  31. When I convert a book from MOBI to Kindle format with Calibre and transfer to Kindle, all the quotations marks (single, double) simply disappear. If I copy the file directly to Kindle without conversion, the marks appear as weird 0s & 1s in a square box. Any with this would be appreciated.

    ReplyDelete
    Replies
    1. If I understand you correctly the original file itself is messed up, correct? I don't think much can be done about that but you can open a bug report at http://calibre-ebook.com/bugs and we can look into it. but we will need more information. please include all information and file attachments requested in http://www.mobileread.com/forums/showthread.php?t=186697

      Delete
  32. I need help. I've typed up my manuscript on Word and converted it to epub using Calibre and transferred it to my iPad but when I click on the book it comes up and all of the margins, tabs and spaces are all messed up. What do I need to do to fix this problem?

    ReplyDelete
  33. Use styles in word to define margins and indents, not spaces.

    ReplyDelete
  34. Hi, I want to convert my ePub file to MOBI without losing any of the formatting. I have Calibre. I have searched everywhere but cannot find any help. I want it to appear exactly as it is in ePub onto Kindle as the formatting is an important part of the book and I worked very hard on getting it just right. Any help would be so great, thank you.
    Exhausted googler
    Sheree

    ReplyDelete
  35. Hello, maybe someone can help me, just bought kindle, converted books via Calibre, pdf to mobi format - moved to device, but each page comes up twice, seems like showing the same page in pdf format and mobi format. I deleted pdf format from Calibre - moved to device - same thing. Deleted from folder and moved just mobi file directly to Kindle - same. Anyone know how to fix this?

    ReplyDelete
  36. If you want to preserve the formatting convert to azw3. that works on the kindle too.

    ReplyDelete
  37. Hi John. I've been converting using Calibre for years now but all of a sudden I'm having difficulties with converting epub to mobi for my Kindle. In this attempt, I seem to only be getting a TOC that appears to be active and hyperlinked, but I get no other content. I can read the book through Viewer just fine, but the final version on my Kindle or phone stops after the TOC...any thoughts?

    ReplyDelete
  38. I am not sure who John is but if you are having trouble with conversion note:

    Conversion of ebooks from one format to another is complex. A conversion is the result of the interaction of thousands of different inputs and subsystems. In order to ask a question in a way that is likely to get help, you must provide at least the following information:
    The file you are trying to convert. If the file is copyrighted then create an extract/sample that shows the problem, or use the calibre bug report system to create a bug with the file attached. see (http://calibre-ebook.com/bugs)
    The conversion log from calibre. You get this by clicking the rotating spinner in the bottom right of the main calibre window and using the show job details button.
    The output file, if any.
    A description of what exactly the problem is. If there is an error message when converting then the full error message, which you can get by clicking the show details button on the error message.
    A description of any conversion options you changed from the default
    It is particularly important that you provide us with a way to reproduce your problem. That makes it much easier to answer your question. That means you provide at least the input file and a description of the problem as well as any non default conversion settings you use
    Thanks :)

    ReplyDelete