I'm using Calibre the ebook viewer to view PDFs, DjVu, and ePub books. I don't know what version the program is, since I couldn't find any about dialog to confirm it. But I downloaded a couple of weeks ago. There was a update very recently which I installed, so this could be due to bad installation or something like that.

My problem is when viewing ebooks with Calibre viewer, two things happen:

  1. If I try to choose them with Calibre open from my library, then they never finish loading.

  2. If I open them from Windows, and I choose to "open with" Calibre the ebook viewer, the result is that they are displayed very badly, with a ugly standard font, with equations all ugly, It easier to show it so I will copy some images comparing how it's viewed with Calibre vs other viewers that work fine.

Calibre with a DjVu, all the pages looks like this:

how calibre wrongly displays a djvu

Other viewer (not calibre) can format equations, of the same ebook, and displays the whole book correctly, this is how it should look: how the book should look, with nice equations, completely readable, like a scanned ebook that it is

I don't understand if Calibre is having a bug or if it's converting ebooks to some basic format. I don't understand why this happens. Help me to view books correctly.

Edit (day 06/ month 05/year 2016): I filed a bug report and got a response from the developer.

1 Answer 1


When the DjVu support for Calibre was added a few years ago, it was implemented by taking the text layer, when available, and extract and convert that to textual material usable for conversion, by Calibre, to other formats. When available it uses the C++ based djvu2txt from the djvu-libre toolset, otherwise it uses a, much slower, decoding done in Python.

That text layer can be generated when "printing" to DjVu, but it normally is built from the image material that you get when you scan files to the DjVu format. And the layer allows you, in most DjVu viewers, to select something on the image and then either copy the image rectangle or the associated text in the text layer.

What you see in WinDjView is the image layer in your DjVu file, what you see in the EbookViewer is the text layer. The text layer has some positioning information (otherwise a viewer would not be able to associate text with a picked area of the image data), but most of that is discarded and only used to make paragraphs.

When I wrote the original DjVu support for Calibre (several years ago), I did so, to make it possible for conversion as indicated above. I had no idea that this made it into the Calibre ebook-viewer. The ebook viewer should directly use the image data, but it obviously doesn't (and that is even less trivial than writing a Python based extractor of the text layer).

I tested viewing a DjVu file without text layer on a recent version of the Calibre ebook viewer. It shows nothing, which confirms my expectation. It could be that the ebook-viewer just picked up the DjVu plugin by using the same interface as the convertor, that would make sense, but in the case of DjVu files that is not the right approach. IIRC there was no way to provide such a plugin and tell Calibre it should only be used for conversion (and not for display).

You're not doing anything wrong. I would rather say this works as can be expected knowing the implementation, but that doesn't make it very useful for books that are not paragraph oriented. So in your words: it is converting the books to some basic format. And this is not easily/quickly fixed.

  • I am hugely grateful that YOU are answering given the fact that you were involved in calibre directly, I am very happy and I thank you for writing that software!!!! So, there is no solution except using another viewer to view calibre files? This seems like a huge usability bug on calibre, since the project claims to be a solution for all your ebook needs, but can't show djvu how it's supposed. Am I right? May 29, 2016 at 17:06
  • Most people aren't interested in viewing books in text layer I guess. At least there should be a clear option, even by default, to show image layer. Am I right? I need your help to know if I'm understanding the situation correctly. So, I want to tell calibre developers, what do I say to them? I want to contact them and tell them in Windows 10 this does not work. I will give you more data: Calibre does not open pdf: it crashes. This is ridiculous. What means "printing" to djvu in your second paragraph in your answer? I understood your answer don't worry!!! May 29, 2016 at 17:06
  • Sorry for being unclear. Thanks for telling me that I'm not doing wrong becayse then I will change to another viewer. Now, should I report usability bug? How it's possible they overlook such a basic feature? Possibly there is something wrong with windows 10? I know you can't answer this. But it seems super misterious, Well thank you a lot !!! May 29, 2016 at 17:10
  • The image layer should be the one shown by default, but that is not implemented (at least not by me). It doesn't work at all (I work on LInux). With the PDF you might have the same issue: that it is images only. With printing I mean from Word or some similar program print directly to a DjVu file, then it is easy to add the text layer to the image layer. But most DjVu files come from scans.
    – Anthon
    May 29, 2016 at 17:11
  • You can file a bug, but for text only books without much layout this behavior is IMO better than not showing anything at all. I think it might be difficult to programmatically tell if displaying the textlayer makes sense or not. Best would be to have image display, but the djvu libre library is C++ and horrible to use. And I only rewrote the text decoding part in Python (and C).
    – Anthon
    May 29, 2016 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.