DjVu: What DjVu Files are and how to open them

Probably you just have come across a DjVu file and are wondering what to do with it. In the following, we give you all the information you need for dealing with such files. DjVu is a container file format for ebooks and documents. 

It usually uses the extension .djvu and was developed as an alternative to the Adobe PDF format in 1996. Due to advanced compression algorithms, DjVu is ideal for scanned documents which contain both pictures and text. In most cases, DjVu files are more compact than comparable PDFs. Take this as the short answer to your question. 

The first part of this article gives you an overview of tools and strategies to deal with these files. We show you how to open DjVu documents and other technical processes related to DjVu, like creating these files.

But also, if you are looking into deeper insights about DjVu, you are at the right place here. The second part of this article will provide you with historical and technical background information about this exciting file format, so stay tuned!

How to Open a DjVu file?

In principle, there are two ways to access a DjVu file. Suppose you are looking for a quick and easy solution. In that case, you can convert it to PDF and then open it with your favorite PDF viewer like Acrobat reader. For converting a DjVu file to PDF, you can directly use our DjVu to PDF converter.

If you prefer to install software to view your DjVu, on the other hand, directly, you can use a DjVu viewer.

For converting your DjVu, we recommend using an online converter. Installing an off-line converter is not worth the effort since you could directly switch to a DjVu viewer instead, which allows you to enjoy all the advantages of DjVu. There are several good reasons to choose the second option. Maybe the rest of the article will convince you to do so. To convert a DjVu document to PDF using our online converter, follow these steps:

Step 1: Open the DjVu converter app and upload the DjVu file you want to convert to PDF. There are two ways of submitting a file. Either drag & drop the document to the uploader, or you can also click on the box to upload a DjVu.

DjVu to PDF step 1

Step 2: Wait a moment until the conversion to PDF has finished after submitting your DjVu

DjVu to PDF step 2

Step 3: Click the download button to download the freshly created PDF file

There are various apps and software for opening a DjVu file. These apps and software depend on the operating software of your mobile or PC. Some great examples are:

Sumatra Reader with DjVu support

The Sumatra Reader is one of the less known DjVu readers which are available for Windows. The other alternatives presented here allow opening and viewing DjVu and supporting basic operations to manipulate and edit them. These operations, for example, include annotations to your DjVu files or exporting single pages to other formats. Therefore, it is probably by far the best choice to deal with DjVu under Windows. The main pro for the Sumatra reader is that the installation process is straightforward. However, other tools offer more sophisticated features. 

WinDjView, MacDjView

Another useful tool which is offering about the same functionality as DjView is WinDjView. WinDjView is a fast and flexible DjVu reader that is based on the free DjVuLibre library. In addition, it allows you to highlight and copy text with the cursor what makes you feel like dealing with a PDF document. Also, the user interface is pretty similar to most PDF readers. As the names already imply, the software is available for Windows and macOS. WinDjView has language support for English and Russian and can be downloaded for free. Concluding on can say that WinDjView is our favorite DjVu viewer for windows.

The STDU Viewer

The STDU Viewer is a free (for non-commercial and educational use) and powerful document viewer which also supports DjVu. The software is available in different languages. Like WinDjView, STDU also supports tabbed document interfaces. In addition, STDU also allows users to save and restore sessions and save users' bookmarks. It also displays thumbnails of pages and allows performing color adjustments and changes of text settings. STDU is available in English, Russian, French, and German. Since it also deals very well with DjVus, which is equipped with a text layer, it is helpful if you want to export plain text from DjVu and other supporting documents. 

Ebookdroid - a Document Reader for Android

You want to read your DjVu documents also on your Smart Phone using Android. No problem! There are also many free document readers available, which allow opening DjVus on Android. A good one, for example, is Ebookdroid which also supports PDF. The installation is effortless via the Google App Store.

It is highly customizable and supports several other eBook formats such as Portable Document Format (PDF), Fiction Book, Comics Book Format, XPS, EPUB, RTF, MOBI, and AWZ3. Its customization ability makes it possible to change the font of the application. Ebookdroid also supports text highlighting, freehand annotations, as well as text notes and page notebooks. Ebookdroid is free to download on Google Play Store.

DjVu on iPhone and iPad: The DjVu Reader

If you want to open a DjVu on iPhone, the Djvu Reader is the app of choice. It is available for free and allows rendering all DjVus and also PDFs. It is available for both iPhone and iPad and allows navigating smoothly through the document with the support of thumbnails. The app is compatible with popular cloud services like Google Drive, Dropbox, Box, One Drive, Yandex. Disk and also offers to search and highlight text options and automatic recovery features. There is also a Pro version of this app, even offering more sophisticated features.

How to create DjVu Files

In case you want to create DjVu files yourself, the quickest approach is to convert PDFs to DjVu. Furthermore, it is also possible to create them from images. A widespread reason for converting an image or PDF to DjVu is to reduce the file size of the original way.

Again, the whole process of creating DjVu files can be done online. The conversion is relatively familiar and reduces the PDF file size by up to 90 percent.

Suppose you are familiar with the Linux command line. In that case, you can also use either the pdf2djvu command-line utility or the toolkits provided by the DjVu libre framework. You can find an excellent overview of all tools to create DjVu files here.

A brief history of DjVu

The DjVu format was developed as an alternative to the PDF format in 1996 at AT&T Labs. These Labs were where some ground-breaking inventions like the transistor happened. The main contributors to the developments of DjVu were Yann LeCun, Léon Bottou, Paul G. Howard, and Patrick Haffner. Yann LeCun and Léon Bottou are also known for important contributions to artificial intelligence and pioneering work in the field of convolutional neural networks.

The leading idea behind the story of DjVu was to create a file format that is optimized for scanned documents which contain both pictures and text. An essential requirement here was that the new file format performs better than PDF for this kind of documents.

The Advantages of DjVu

The main advantage of DjVu is the tiny file size of DjVu files. Therefore, they are frequently used for the distribution of scanned documents on the web or via email. In contrast to PDF, DjVu is an open file format which means that it can be used by both open-source software and proprietary software without any charge. The DjVu Format usually uses the extension .djvu or sometimes also only .djv.

DjVu vs PDF

DjVu is a file format for scanned document storage. One huge benefit here, compared to PDF, is the format's higher compression. However, the main problem with DjVu files is that you can't open them unless you use a specific program that supports the format.

DjVu is an excellent solution that allows the user to store large documents in one place in a compressed fashion.

DjVu files also open more quickly. Instead of being opened at full quality, the file is initially opened at a lower rate. The quality is raised until it is where it needs to be. DjVu can't be convicted as "better" than PDF overall. Whereas the former is much easier on storage (smaller file size), it also has a lower resolution as a compromise. Still, most of the time, DjVu files are perfectly legible and easy to read, making them a great alternative to PDF.

However, PDF use is much more widespread and is pretty much compatible across the board. It is primarily viewed as the standard for electronic documents. However, DjVu is not as widely used, and there are much fewer programs out there that support the program compared to PDFs.

Technical aspects of DjVu

Advanced Compression: The Main Advantages of DjVu DjVu files use advanced compression technologies, which are about 5 to 10 times better than JPEG and Tiff. A scanned page in color (resolution 300 DPI) with a file size of about 25 MB can be easily compressed to only 100 kB using DjVu. All DjVus can be equipped with a text layer to make them searchable. These searchable DjVus behave very similar to PDF documents.

A key to achieving this excellent compression is so-called multi-scale bi-color clustering. This clustering allows a foreground/background mask separation that is way more general than the standard text/image segmentation. Along with a set of soft pattern matching algorithms, the JBIG2 compression, which DjVu uses, beats the JBIG1 compression, which has been the standard for bi-level images for a long time, by a factor of two. 

The principle behind the JBIG2 encoding is the following: First, the method identifies nearly identical shapes on the page, such as multiple occurrences of a particular character in a given font, style, and size. 

Then it compresses the bitmap of each unique shape separately and then encodes the locations where each shape appears on the page. Similar conditions are only compressed once instead of multiple times, explaining the advantage in terms of file size DjVu files usually show. Other critical components of the compression technique used by DjVu are a multi-scale successive projections algorithm and the so-called ZP-coder.

DjVu files with hidden OCR Layers

Until now, one can think of a DjVu file as a loose collection of raftered images that do not contain any searchable text information. This feature makes any DjVu file appear challenging to handle. So we have to get used to the fact that PDF is the more handsome format without discussion?

Of course not! The authors of DjVu were clever enough to find a creative workaround here. To make DjVu files searchable and therefore behave very similar to PDFs, they added a hidden OCR layer to the definition of the file format. This is a very economical way of providing the text information in a searchable manner.

On the other hand, in keeping a strict separation between the document's visual appearance and the content that the reader can search, most DjVu files circulating on the web contain such a text layer. The main difference between DjVu and PDF is that the DjVu format is a raster image format.

In contrast, the PDF format is a scalable vector file format. This trick even allows you to copy and paste text easily from any DjVu. DjVu files are equipped with such a layer as one is used for dealing with PDFs.

Licensing and Adaption of DjVu

DjVu appeared first as an open-source implementation named "DjVuLibre" and used the GNU General Public License. However, the copyrights to the commercial developments of the encoding software have been transferred to several different companies over the years, including AT&T Corporation, LizardTech, and Celartem, among others. Some experts believe that the DjVu format is better for documents due to superior compression algorithms. Despite this, PDF is used more frequently. 

DjVu reached a considerable level of acceptance because of its open-source licensing. Since DjVu was developed at the peak of digitalization, many books were scanned still many scanned documents and readers across the web are using DjVu. 

Furthermore, in 2002 the Internet Archive, with its Million Book Project, which provides millions of scanned public-domain books, also supported DjVu and PDF.

The technical file specifications of DjVu

DjVu was initially derived from the Interchange File Format (IFF) based on hierarchically organized chunks. Like is the case for IFF, a 4-byte AT&T magic number precedes its structure.

A magic number is a series of bits working as a unique identifier. It is telling an application opening a file the exact file type it is dealing with. The following figure illustrates the internal structure of a DjVu document.

The internal structure of a DjVu document

This identifier is followed by a marker indicating if one has to deal with a single-page (DJVU) or a multi-page document (DJVM), respectively. Going into more detail here would undoubtedly go beyond the scope of this article. Another essential specification, however, is the internet mime-type for DjVu, which is image/vnd.djvu or image/x-DjVu. The current version of DjVu is Version 26, which was released more than ten years ago.

The Future of DjVu

There has not been much progress on the development of DjVu during the last years. Despite this, the number of DjVus which are produced has been increasing ultimately again. This may be due to the most compelling strength of DjVu files, namely their incredibly compact file size. In recent times, the world is becoming more mobile-friendly. Also, with the cost of bandwidth at an all-time high price, the superior compression of DjVu may help save time and money.

Meanwhile, there exist also Apps that can display DjVus on smartphones and tablets. Of course, this is pure speculation, but maybe the future of DjVu might be brighter than its past. The name DjVu implements some hidden message since it's inspired by the French expression DjVu [deʒaˈvy], which means something like "already seen".

Since you are now familiar with DjVu, you can be pretty sure that you will see it again very soon as long as you are moving in the world of the web.