DDJVU(1)
π DDJVU(1) β the DjVu decoder, but make it a group chat
okay so bestie, sit down, hydrate, because we're about to talk about ddjvu β that's the Command line DjVu decoder from the DjVuLibre era, and she is lowkey iconic. this is the ddjvu(1) manual page, rewritten with love, but every single fact is still in here. no cap. π«Ά
β¨ SYNOPSIS β¨
ddjvu -format=fmt [options] [djvufile] [outputfile]
like, that's the whole vibe. one format, some options, a file in, a file out. slay.
πΈ DESCRIPTION πΈ
So what she does is: decode the DjVu file djvufile, and produce the image file outputfile. that's the whole job. she's a decoder, she's booked and busy. β¨
Now, the tea about where the data comes from:
- The DjVu data is read from standard input when the argument djvufile is not specified, or when it's equal to a single dash. π
- Same energy for output: the output data is written to standard output when the argument outputfile is not specified, or equal to a single dash.
but bestie, listen β a valid output file name is always required when you're producing a TIFF or PDF file. no exceptions, no vibes-based workarounds. π«
π MAIN OPTIONS π
these are the main character options. the ones that actually run the show. π
-format=fmtβ this one sets the output file format, and honestly? she's the moment. The recognized file formats arepbm,pgm,ppm,pnm,rle,tiff, andpdf. here's the breakdown, no skimming:- Formats
pbm,pgm, andppmrespectively produce a Portable Bitmap (PBM), Portable Graymap (PGM), or Portable Pixmap (PPM) file. Formatpnmis the flexible queen β she produces a PBM, PGM, or PPM output file according to the color content of the output image. π¨ - Format
rleproduces a compact run length encoded bitonal file that is understood by the DjVuLibre commandscjb2andcsepdjvu. iykyk. π - Format
tiffproduces a Tagged Image Format (TIFF) file using lossless compression. Enabling lossy JPEG compression (see option-qualitybelow) often produces much smaller files. Commandstiffcp(1)andtiffsplit(1)are useful for manipulating the resulting TIFF files. teamwork makes the dream work. π«Ά - Format
pdfproduces 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-qualitybelow) often produces much smaller files. An alternate way to produce PDF file consists in first usingdjvups(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. two paths, both valid, choose your fighter. βοΈ
- Formats
okay and this part matters: when option-formatis 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 ofddjvu. We recommend to always specify the output format using this option. fr fr, just say the format. π
-page=pagespecβ tells her 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, specification1-10outputs pages 1 to 10, and specification1,3,99999-4outputs pages 1 and 3, followed by all the document pages in reverse order up to page 4. she can go backwards, she's talented like that. π₯-eachpageβ When this option is specified, programddjvugenerates one separate file per page, named by replacing the%dspecification in outputfilename by the page number in a manner simular to theprintf(3)function. yes, it says "simular" in the original. we keep it. π-mode=modβ Selects which layers of the DjVu image should be rendered. Valid rendering modes arecolor,black,mask,foreground, andbackground. the lineup:- Rendering mode
coloris 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
blackis 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, andbackgroundselect specific layers of a DjVu image. These modes can fail if the DjVu image does not contain the selected layer. so, gentle heads up. π
- Rendering mode
-skipβ Instead of aborting when encountering a corrupted page, this option causesddjvuto simply skip the corrupted page and continue with the next. This is useful for processing certain damaged files. she's resilient, she's healing, she moves on. π§
π RESOLUTION OPTIONS π
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. so if you say nothing, she gives you the real thing, untouched. π
-nβ Specify an integer sub-sampling factor. The dimensions of the full output image will bentimes smaller than the DjVu image size. The legal values for argument n range from1to12. Option-1, for instance, produces an output image whose resolution is equal to the resolution of the input DjVu image file. (yes,-1and-ncollide a lil bit. it's fine. it's a whole thing. π)-subsample=nβ This is equivalent to option-n. same girl, different name. π-scale=magβ Specify a magnification factor relative to the resolution stored in the DjVu image. Specifying magnification of100produces an image suitable for displaying on a100dpi 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. it's giving "screen-ready". β¨-size=wxhβ 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. they're a package deal bestie. π-aspect=yesnoβ This option indicates whether the image aspect ratio should be preserved. The defaults is to preserve the aspect ration. (yes, "ration". we're keeping the typo, it's part of the lore. π) This option permits changes in the aspect ratio when used in combination with option-size.
π¦ OTHER OPTIONS π¦
the little extras. the accessories to the outfit. π
-verboseβ Display informational messages describing the structure of the DjVu image and the format of the output file. she'll tell you everything, she's an open book. π«Ά-segment=wxh+x+yβ Specify an image segment to render. Programddjvuconceptually 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 sizewxhwhen this option is specified. efficiency queen. β‘-quality=factorβ Enables lossy JPEG compression for TIFF and PDF files. This option only affects images that cannot be encoded using the preferredTIFF/G4compression. Argument factor is a quantization factor ranging from25to150. See commandcjpeg(1)for more information on JPEG quantization factors. Value80is a good starting point. πΈ-quality=uncompressedβ 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. (we've all met that software. π)-quality=deflateβ Enables DEFLATE compression for TIFF files. Images that cannot be encoded using the preferredTIFF/G4compression will be encoded with DEFLATE compression if available. Otherwise the more portablePACKBITScompression is used. Specifying this option is not necessary for PDF files because this is the default behavior. β¨
π DEPRECATED OPTIONS π
Various options have been maintained to ensure backward compatibility with previous versions of ddjvu. Here's the lore, and here's why you should NOT touch it:
- When option
-formatis not specified, the program only decodes the first page of the document and the default resolution becomes-scale=100. - Options
-size,-scale,-segment, and-pageaccept an argument separated by a space. - Options
-foreground,-background, and-blackare shorthands for the-mode=modoption.
Please do not rely on these features. like, genuinely. they're legacy. let them rest. πͺ¦
π EXAMPLES π
Command
ddjvu -format=tiff myfile.djvu myfile.tif
decodes all pages and produces a multipage TIFF file. multipage!! she ate. π
Command
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. thumbnail factory, honestly. πβ¨
π«Ά CREDITS π«Ά
The new version of this program was written by LΓ©on Bottou <leonb@users.sourceforge.net>. legend behavior. π
This program includes code derived from program tiff2pdf, written by Ross Finlayson and released under a BSD license. credit where credit is due, always. πΈ
π SEE ALSO π
djvu(1), djview(1), pnm(5), pbm(5), pgm(5), ppm(5), cjpeg(1), tiffsplit(1), tiffcp(1), printf(3)
go read those too, bestie, the whole family is iconic. π
and that's the page!! this was DjVuLibre-3.5, dated 10/19/2002, and she's still serving after all these years. mwah. π β¨π
π¦ where this page comes from
- alpine 3.24: djvulibre-doc 3.5.30-r0 Β· GPL-2.0-only
- arch rolling: djvulibre 3.5.30.1-1 Β· GPL-2.0-or-later
- debian bookworm: djvulibre-bin 3.5.28-2.1~deb12u1
- debian bookworm: djvulibre-bin 3.5.28-2.2~deb12u1
- debian trixie: djvulibre-bin 3.5.28-2.2
- epel 10: djvulibre 3.5.28-13.el10_0 Β· GPL-2.0-or-later
- epel 9: djvulibre 3.5.28-4.el9 Β· GPLv2+
- fedora 43: djvulibre 3.5.28-14.fc43 Β· GPL-2.0-or-later
- fedora 43: djvulibre 3.5.30-1.fc43 Β· GPL-2.0-or-later
- fedora 44: djvulibre 3.5.28-16.fc44 Β· GPL-2.0-or-later
- fedora 44: djvulibre 3.5.30-1.fc44 Β· GPL-2.0-or-later
- nixos 26.05: djvulibre 3.5.29
- nixpkgs unstable: djvulibre 3.5.30
- opensuse-leap 16.0: djvulibre 3.5.28-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: djvulibre 3.5.28-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: djvulibre 3.5.28-160000.2.2 Β· GPL-2.0-or-later
- opensuse-leap 16.0: djvulibre 3.5.28-160000.2.2 Β· GPL-2.0-or-later
- ubuntu jammy: djvulibre-bin 3.5.28-2build2
- ubuntu jammy: djvulibre-bin 3.5.28-2ubuntu0.22.04.2
- ubuntu noble: djvulibre-bin 3.5.28-2build4
- ubuntu noble: djvulibre-bin 3.5.28-2ubuntu0.24.04.2
- ubuntu questing: djvulibre-bin 3.5.28-2.2
- ubuntu resolute: djvulibre-bin 3.5.29-1
- ubuntu stonking: djvulibre-bin 3.5.30-1
- Copyright (c) 2001-2003 Leon Bottou, Yann Le Cun, Patrick Haffner
- Copyright (c) 2001 AT&T Corp., and Lizardtech, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms