OnWorks favicon

ddjvu - Online in the Cloud

Run ddjvu in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command ddjvu that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



ddjvu - Command line DjVu decoder.


ddjvu -format=fmt [options] [djvufile] [outputfile]


Decode the DjVu file djvufile, produces the image file outputfile.

The DjVu data is read from the standard input when argument djvufile is not specified or
when it is equal to a single dash. Similarly, the output data is written to the standard
output when argument outputfile is not specified or equal to a single dash. However a
valid output file name is always required when producing a TIFF or PDF file.


Specify the output file formats. The recognized file formats are pbm, pgm, ppm,
pnm, rle, tiff, and pdf.

* Formats pbm, pgm, and ppm respectively produce a Portable Bitmap (PBM), Portable
Graymap (PGM), or Portable Pixmap (PPM) file. Format pnm produces a PBM, PGM,
or PPM output file according to the color content of the output image.

* Format rle produces a compact run length encoded bitonal file that is understood
by the DjVuLibre commands cjb2 and csepdjvu.

* Format tiff produces a Tagged Image Format (TIFF) file using lossless
compression. Enabling lossy JPEG compression (see option -quality below) often
produces much smaller files. Commands tiffcp(1) and tiffsplit(1) are useful for
manipulating the resulting TIFF files.

* Format pdf produces a Portable Document Format (PDF) file. Each page in the
resulting file is represented by an image at the specified resolution, using
lossless compression. Enabling lossy JPEG compression (see option -quality
below) often produces much smaller files. An alternate way to produce PDF file
consists in first using djvups(1) and convert the resulting PostScript file to
PDF. Which method gives better results depends on the contents of the DJVU file
and on the capabilities of the PS to PDF converter.

When option -format is not specified, the extension of argument outputfile has no
influence on the default output format. Instead the program behavior is modified
to ensure backward compatibility with previous versions of ddjvu. We recommend to
always specify the output format using this option.

Specify which pages should be decoded. When this option is not specified, all
pages of the documents are decoded and concatenated into the output file. The page
specification pagespec contains one or more comma-separated page ranges. A page
range is either a page number, or two page numbers separated by a dash. For
instance, specification 1-10 outputs pages 1 to 10, and specification 1,3,99999-4
outputs pages 1 and 3, followed by all the document pages in reverse order up to
page 4.

When this option is specified, program ddjvu generates one separate file per page
named by replacing the %d specification in outputfilename by the page number in a
manner simular to the printf(3) function.

Selects which layers of the DjVu image should be rendered. Valid rendering modes
are color, black, mask, foreground, and background.

* Rendering mode color is the default mode. When the DjVu file is bitonal,
bitonal or gray-level output is produced depending on the subsampling factor.
Otherwise a color image is produced.

* Rendering mode black is useful to extract a meaningful black and white image.
bitonal or gray-level output is produced depending on the subsampling factor.

* Rendering modes mask, foreground, and background select specific layers of a
DjVu image. These modes can fail if the DjVu image does not contain the
selected layer.

-skip Instead of aborting when encountering a corrupted page, this option causes ddjvu to
simply skip the corrupted page and continue with the next. This is useful for
processing certain damaged files.


The following options control the resolution of the output image. The default resolution
is the native resolution of the DjVu file, equivalent to selecting -1.

-n Specify an integer sub-sampling factor. The dimensions of the full output image
will be n times smaller than the DjVu image size. The legal values for argument n
range from 1 to 12. Option -1, for instance, produces an output image whose
resolution is equal to the resolution of the input DjVu image file.

This is equivalent to option -n.

Specify a magnification factor relative to the resolution stored in the DjVu image.
Specifying magnification of 100 produces an image suitable for displaying on a 100
dpi device such as a computer screen. The magnification factor mag can also be
interpreted as the resolution of the output image expressed in dot per inch.

Specify the size of the full output image. Rendering the full DjVu image would
create an output image whose width and height would not exceed w and h. To change
the aspect ratio, you must also use option -aspect=no.

This option indicates whether the image aspect ratio should be preserved. The
defaults is to preserve the aspect ration. This option permits changes in the
aspect ratio when used in combination with option -size.


Display informational messages describing the structure of the DjVu image and the
format of the output file.

Specify an image segment to render. Program ddjvu conceptually renders the full
page using the specified resolution, and then extracts a sub-image of width w and
height h, starting at position (x,y) relative to the bottom left corner of the
page. Both operations of course happen simultaneously. Rendering a small sub-
image is much faster than rendering the complete image. The output file will
always have size wxh when this option is specified.

Enables lossy JPEG compression for TIFF and PDF files. This option only affects
images that cannot be encoded using the preferred TIFF/G4 compression. Argument
factor is a quantization factor ranging from 25 to 150. See command cjpeg(1) for
more information on JPEG quantization factors. Value 80 is a good starting point.

Completely disables compression in TIFF and PDF files. Although the resulting
files are often huge, this is sometimes useful for maximal compatibility with
hastily written software.

Enables DEFLATE compression for TIFF files. Images that cannot be encoded using
the preferred TIFF/G4 compression will be encoded with DEFLATE compression if
available. Otherwise the more portable PACKBITS compression is used. Specifying
this option is not necessary for PDF files because this is the default behavior.


Various options have been maintained to ensure backward compatibility with previous
versions of ddjvu. When option -format is not specified, the program only decodes the
first page of the document and the default resolution becomes -scale=100. Options -size,
-scale, -segment, and -page accept an argument separated by a space. Options -foreground,
-background, and -black are shorthands for the -mode=mod option. Please do not rely on
these features.



ddjvu -format=tiff myfile.djvu myfile.tif

decodes all pages and produces a multipage TIFF file.


ddjvu -format=ppm -page=1-10 -eachpage -size=100x100 myfile.djvu thumb%03d.ppm

produces 100x100 thumbnails for the first ten page of a document and outputs them as PPM
files named thumb001.ppm to thumb010.ppm.


The new version of this program was written by Léon Bottou <[email protected]>.

This program includes code derived from program tiff2pdf, written by Ross Finlayson and
released under a BSD license.

Use ddjvu online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    VirtualGL redirects 3D commands from a
    Unix/Linux OpenGL application onto a
    server-side GPU and converts the
    rendered 3D images into a video stream
    with which ...
    Download VirtualGL
  • 2
    Library to enable user space
    application programs to communicate with
    USB devices. Audience: Developers, End
    Users/Desktop. Programming Language: C.
    Download libusb
  • 3
    SWIG is a software development tool
    that connects programs written in C and
    C++ with a variety of high-level
    programming languages. SWIG is used with
    Download SWIG
  • 4
    WooCommerce Nextjs React Theme
    WooCommerce Nextjs React Theme
    React WooCommerce theme, built with
    Next JS, Webpack, Babel, Node, and
    Express, using GraphQL and Apollo
    Client. WooCommerce Store in React(
    contains: Products...
    Download WooCommerce Nextjs React Theme
  • 5
    Package repo for ArchLabs This is an
    application that can also be fetched
    It has been hosted in OnWorks in...
    Download archlabs_repo
  • 6
    Zephyr Project
    Zephyr Project
    The Zephyr Project is a new generation
    real-time operating system (RTOS) that
    supports multiple hardware
    architectures. It is based on a
    small-footprint kernel...
    Download Zephyr Project
  • More »

Linux commands

  • 1
    4s-import � Import RDF into a 4store KB
    Run 4s-importJ
  • 2
    4s-query � Run SPARQL queries on a
    4store storage backend ...
    Run 4s-queryJ
  • 3
    cpuburn, burnBX, burnK6, burnK7,
    burnMMX, burnP5, burnP6 - a collection
    of programs to put heavy load on CPU ...
    Run cpuburn
  • 4
    cpufreq-aperf - Calculates the average
    frequency over a time period SYNTAX:
    cpufreq-aperf [options] DESCRIPTION: On
    latest processors exist two MSR
    registers r...
    Run cpufreq-aperf
  • 5
    g.dirseps - Internal GRASS utility for
    converting directory separator
    characters. Converts any directory
    separator characters in the input string
    to or from na...
    Run g.dirsepsgrass
  • 6
    g.extension - Maintains GRASS Addons
    extensions in local GRASS installation.
    Downloads, installs extensions from
    GRASS Addons SVN repository into local
    GRASS i...
    Run g.extensiongrass
  • More »