Project Page
Browse Git
Any2DjVu conversion server
LizardTech home
SourceForge Logo


Project Page |  Forums |  Bugs |  Support |  Patches |  News |  Git |  Files 

DjVuDigital and GSDjVu

DjVuDigital is a very efficient way of converting PostScript and PDF documents into DjVu. It relies on a GhostScript driver named GSDjVu that analyzes the sequence of rendering operations and classifies each of them as foreground or background. The rather sophisticated algorithm is fully described in this paper. The resulting segmentation is then used to produce a DjVu file, using, for instance, the DjVuLibre program csepdjvu.

This code was written five years ago with the intention of making it freely available to promote the development of DjVu. Things did not happen as we wanted. During the DjVu Summit Conference, Carlos Domingo, new CEO of Lizardtech, agreed to the distribution of DjVuDigital as a part of DjVuLibre. But AT&T Labs had to release its part of the code, the GSDjVu Ghostscript driver. This took more time than anyone expected.

The good news

Eventually, in June 2005, AT&T Labs released the source code of the GSDjVu driver for Ghostscript under the terms of the Common Public License Version V1.0 (CPL). We are very happy to finally see this code freely available, and warmly thank all the persons who made this release happen.

The less good news

The CPL is a genuine free software license that unfortunately is incompatible with the GPL. This is explained on the web pages of the Free Software Fundation. This is very annoying because the GhostScript source code is available under the terms of the GPL (also under the AFPL which is too restricive for our purposes.)

The requirements of the CPL, including the incompatible requirements identified by the Free Software Fundation, only apply to the redistribution of CPL licensed programs. Therefore we believe that anyone is free to download both the GSDjVu and GhostScript source code packages and to use them as they see fit. In particular, anyone can combine and compile these source code packages. However, we are certain that it is not possible to redistribute the resulting executable, because it is not possible to satisfy the redistribution requirements of both the CPL and the GPL.

The above statement is merely the expression of our belief. It should not be understood as a guarantee of any kind. You must make your own opinion before compiling GSDjVu.

Where to get GSDjVu?

Do not use GSDjVu unless you understand the consequences of this license incompatibility. If you are determined to compile GSDjVu, you will find much easier to use the improved version prepared by the DjVuLibre team (after all, we wrote this code in the first place.)

The updated source code is available from the DjVuLibre project page on Sourceforge. It comes with a README file that explains how to compile a working executable, and a COPYING file that discusses the rather contradictory licensing conditions.

Because of the license incompatibility discussed above, we cannot release precompiled binaries. The original AT&T Labs release is available here.

How to request a GPL release?

The only practical way to solve the incompatibility issue is to politely ask our AT&T friends to clarify their intentions. Please send a brief email to AT&T Intellectual Property Licensing organization <>, with a copy to <>

  • First thank them warmly because they worked very hard and used their hard earned professional credit to help release GSDjVu under a free license.
  • Second give your best argument to justify authorizing the redistribution of GSDjVu under the GPL. Here are a few examples:
    • Whatever the purposes of the GSDjVu open source release are, this purpose would be better served by licensing terms that facilitate the use of GSDjVu.
    • Legally, what does it mean to release a source code (GSDjVu), whose operation technically depends on a second program (GhostScript), under terms that are incompatible with those of this second program.

Uses of GSDjVu besides DjVu

In return we would like to drop a few ideas on commercialy feasible uses of the GSDjVu technology besides DJVU compression. Do not hesitate to contact AT&T <> to commercially license GSDjVu for such purposes.

GSDjVu is a very powerful technology that analyzes each page of an electronically generated document and decomposes it as (1) a low resolution continuous color background image, and (2) a collection of high resolution foreground objects having each a single flat color. Such a decomposition can be very useful:

  • PDF Optimization --- The quality and size of PDF files vary dramatically according to the quality of the input material. The GSDjVu decomposition is a good basis to significatively reduce the size of badly authored PDF files.
  • Printing --- Most printers represent colors with dithering. Large dithering patterns give accurate colors at the expense of resolution. Small dithering patterns give coarser colors with higher resolution. The GSDJVU decomposion neatly identifies which parts of a page are best printed using small or large dithering patterns.
  • Helping vision challenged persons --- The GSDjVu decomposition allows for dimming graphical embellishments that make reading difficult and enhancing the contrast of the meaningful text and graphics.
DjVu Libre