1DDJVU(1)                         DjVuLibre-3.5                        DDJVU(1)
2
3
4

NAME

6       ddjvu - Command line DjVu decoder.
7
8

SYNOPSIS

10       ddjvu -format=fmt [options] [djvufile] [outputfile]
11
12

DESCRIPTION

14       This  program  decodes  DjVu  file  djvufile, produces a raw image, and
15       saves it into file outputfile.
16
17       The DjVu data is read from the standard input when argument djvufile is
18       not  specified  or  when  it is equal to a single dash.  Similarly, the
19       output data is written to the standard output when argument  outputfile
20       is not specified or equal to a single dash.
21
22

MAIN OPTIONS

24       -format=fmt
25              Specify  the  output  file formats.  The recognized file formats
26              are pbm, pgm, ppm, pnm, tiff, and rle.
27
28              *  Formats pbm, pgm, and ppm  respectively  produce  a  Portable
29                 Bitmap  (PBM),  Portable  Graymap  (PGM),  or Portable Pixmap
30                 (PGM) file.  Format pnm produces either a PBM, a  PGM,  or  a
31                 PPM  output  file according to the color nature of the output
32                 image.
33
34              *  Format tiff produces a Tagged Image Format (TIFF) file.  Com‐
35                 mand  tiffcp(1)  and tiffsplit(1) are useful for manipulating
36                 the resulting TIFF files.
37
38              *  Format rle produces a compact run length encoded bitonal file
39                 that  is  understood  by  the  DjVuLibre  commands  cjb2  and
40                 csepdjvu.
41
42              When option -format is not specified, the extension of  argument
43              outputfile  has  no  influence  on  the  default  output format.
44              Instead the program behavior is modified to ensure backward com‐
45              patibility  with  previous  versions  of ddjvu.  We recommend to
46              always specify the output format using this option.
47
48       -page=pagespec
49              Specify which pages should be decoded.  When this option is  not
50              specified,  all  pages of the documents are decoded and concate‐
51              nated into the output file.   The  page  specification  pagespec
52              contains  one or more comma-separated page ranges.  A page range
53              is either a page number, or two  page  numbers  separated  by  a
54              dash.   For  instance, specification 1-10 outputs pages 1 to 10,
55              and specification 1,3,99999-4 outputs pages 1 and 3, followed by
56              all the document pages in reverse order up to page 4.
57
58       -mode=mod
59              Selects  which  layers  of  the  DjVu  image should be rendered.
60              Valid rendering modes are color, black,  mask,  foreground,  and
61              background.
62
63              *  Rendering mode color is the default mode.  When the DjVu file
64                 is bitonal, bitonal or gray-level output is produced  depend‐
65                 ing  on  the  subsampling factor.  Otherwise a color image is
66                 produced.
67
68              *  Rendering mode black is useful to extract a meaningful  black
69                 and  white  image.   bitonal or gray-level output is produced
70                 depending on the subsampling factor.
71
72              *  Rendering modes mask, foreground, and background select  spe‐
73                 cific  layers  of  a DjVu image.  These modes can fail if the
74                 DjVu image does not contain the selected layer.
75
76

RESOLUTION OPTIONS

78       The following options control the resolution of the output image.   The
79       default  resolution  is the native resolution of the DjVu file, equiva‐
80       lent to selecting -1.
81
82       -n     Specify an integer sub-sampling factor.  The dimensions  of  the
83              full  output  image  will be n times smaller than the DjVu image
84              size.  The legal values for argument  n  range  from  1  to  12.
85              Option  -1, for instance, produces an output image whose resolu‐
86              tion is equal to the resolution of the input DjVu image file.
87
88       -subsample=n
89              This is equivalent to option -n.
90
91       -scale=mag
92              Specify a magnification factor relative to the resolution stored
93              in  the DjVu image.  Specifying magnification of 100 produces an
94              image suitable for displaying on a 100 dpi device such as a com‐
95              puter  screen.   The magnification factor mag can also be inter‐
96              preted as the resolution of the output image  expressed  in  dot
97              per inch.
98
99       -size=wxh
100              Specify  the  size of the full output image.  Rendering the full
101              DjVu image would create an output image whose width  and  height
102              would  not exceed w and h.  To change the aspect ratio, you must
103              also use option -aspect=no.
104
105       -aspect=yesno
106              This option indicates whether the image aspect ratio  should  be
107              preserved.   The defaults is to preserve the aspect ration. This
108              option permits changes in the aspect ratio when used in combina‐
109              tion with option -size.
110
111

OTHER OPTIONS

113       -verbose
114              Display  informational  messages describing the structure of the
115              DjVu image and the format of the output file.
116
117       -segment=wxh+x+y
118              Specify an image segment to render.  Program ddjvu  conceptually
119              renders  the  full page using the specified resolution, and then
120              extracts a sub-image of width w and height h, starting at  posi‐
121              tion (x,y) relative to the bottom left corner of the page.  Both
122              operations of course happen simultaneously.  Rendering  a  small
123              sub-image is much faster than rendering the complete image.  The
124              output file will always have size wxh when this option is speci‐
125              fied.
126
127       -quality=factor
128              Enables  lossy  compression in TIFF files.  Without this option,
129              TIFF files always use lossless compression  or  no  compression.
130              Argument  factor  specifies  a  JPEG quantization factor ranging
131              from 25 to 150. See command cjpeg(1)  for  more  information  on
132              JPEG quantization factors.
133
134

DEPRECATED OPTIONS

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

EXAMPLES

147       Command
148
149          ddjvu -format=tiff myfile.djvu myfile.tif
150
151       decodes all pages and produces a multipage TIFF file.
152
153       Command
154
155          ddjvu -format=ppm -page=1 -size=100x100 myfile.djvu -
156
157       produces a thumbnail for the first page of a document and outputs it as
158       a PPM file on the standard output:
159
160

CREDITS

162       The   new   version   of  this  program  was  written  by  Léon  Bottou
163       <leonb@users.sourceforge.net>.
164
165

SEE ALSO

167       djvu(1), djview(1), pnm(5), pbm(5), pgm(5),  ppm(5),  cjpeg(1),  tiffs‐
168       plit(1), tiffcp(1)
169
170
171
172DjVuLibre-3.5                     10/19/2002                          DDJVU(1)
Impressum