1DJVUDIGITAL(1) DjVuLibre-3.5 DJVUDIGITAL(1)
2
3
4
6 djvudigital - creates DjVu files from PS or PDF files.
7
8
10 djvudigital [options] inputfile [outputfile]
11
12
14 This program creates a DjVu file from the PostScript (.ps), GZipped
15 PostScript (.ps.gz), Encapsulated PostScript (.eps), or Portable Docu‐
16 ment Format (.pdf) file inputfile.
17
18 The output file name is either given by argument outputfile or gener‐
19 ated by replacing the input file name suffixes by the DjVu suffix
20 (.djvu).
21
22
24 This program depends on a specific GhostScript driver. If your Ghost‐
25 Script program does not provide this driver, please check
26 http://djvu.sourceforge.net/gsdjvu.html.
27
28
30 --verbose, -v
31 Displays more informational messages while converting the file.
32
33 --quiet, -q
34 Do not display informational messages while converting the file.
35
36 --dpi=resolution
37 Specify the desired resolution to resolution dots per inch. The
38 default is 300 dpi.
39
40 --psrotate=angle
41 Rotate the PostScript file by angle degrees clockwise. Only the
42 values 0, 90, 180, and 270 are supported. This option only ap‐
43 plies to PostScript files. PDF files are always converted ac‐
44 cording to their native orientation.
45
46 --epsf=disposition
47 Specify how to handle Encapsulated PostScript files. Argument
48 disposition can take the values crop, fit, and ignore. The de‐
49 fault disposition crop creates a DjVu file whose size matches
50 the bounding box of the Encapsulated PostScript file. Value fit
51 rescales the graphics to the default page size. Value ignore
52 disables all Encapsulated PostScript specific code. This option
53 requires Ghostscript 7.07 or better.
54
55 --exact-color
56 Enables a more accurate rendering of the colors. This option
57 requires GhostScript 6.52 or better.
58
59 --threshold=thres
60 Specify a threshold for the foreground/background separation
61 code. Acceptable values of thres range from 0 to 100. Larger
62 values place more information into the foreground layer. The
63 default threshold value is 80.
64
65 --bg-subsample=sub
66 Specify the background subsampling ratio. Argument sub must be
67 an integer between 1 and 6. The default value is 3.
68
69 --bg-slices=n+...+n
70 Specify the encoding quality of the background layer. The syn‐
71 tax for the argument is similar to that described for the -slice
72 option of command c44. The default is 72+11+10+10.
73
74 --fg-colors=ncolors
75 Specify the maximum number of distinct colors in the foreground
76 layer. Argument ncolors can take integer values between 1 and
77 4000. The default value is 256.
78
79 --fg-image-colors=ncolors
80 Specify the maximum number of distinct colors in an image for
81 considering encoding it into the foreground layer. Argument
82 ncolors can take integer values between 1 and 4000. The default
83 value is 256.
84
85 --words
86 Extract the text from the PostScript code and incorporates this
87 information into the DjVu file. This option records the loca‐
88 tion of every word.
89
90 --lines
91 Extract the text from the PostScript code and incorporates this
92 information into the DjVu file. This option saves a few bytes
93 by only recording the location of each line.
94
95 --gsarg=arg1[,arg2,...,argN]
96 Insert extra arguments on the GhostScript command line.
97
98 --cseparg=arg1[,arg2,...,argN]
99 Insert extra arguments on the command line of program csepdjvu
100 or msepdjvu.
101
102 --poppler=keywords
103 This option causes djvudigital to extract additional information
104 from PDF files using the tool pdftotext that comes bundled with
105 the Poppler library. Selected information is then added to the
106 djvu file as a postprocessing step. This option is ignored when
107 the input file is not a PDF file. Argument keywords is a comma
108 separated list of keywords. When this list contains keyword
109 meta, the metadata extracted by pdftotext is inserted into the
110 djvu file. When this list contains keyword text, the textual
111 information extracted by pdftotext is inserted into the djvu
112 file, possibly replacing the information gathered using the op‐
113 tions --words or --lines. This is useful for instance when a
114 scanned PDF file contains a hidden text layer that is not recog‐
115 nized by Ghostscript and therefore not passed to the djvudigital
116 backend.
117
118 --sepfile
119 Produces a separated data file instead of a DjVu file. Program
120 csepdjvu can then convert the separated data file into a DjVu
121 file.
122
123 --check
124 Display the names of the two auxiliary programs found by
125 djvudigital, namely a suitable ghostscript interpreter and a
126 suitable backend encoder. See the next two section for details.
127
128 --dryrun
129 Simply display the ghostscript command line generated by
130 djvudigital without running it. No output file is produced
131
132 --help Display the manual page for djvudigital.
133
135 Program djvudigital internally relies on a specific Ghostscript driver
136 named djvusep. This driver analyzes the logical structure of the se‐
137 quence of PostScript rendering commands and decides to execute each
138 command into either the foreground or the background layer. The Ghost‐
139 Script driver produces a separated data file that is then compressed
140 using the DjVuLibre program csepdjvu.
141
142 Before processing the input file, program djvudigital searches a Ghost‐
143 script executable providing the djvusep driver. The search starts with
144 the file specified by the environment variable GSDJVU and continues
145 with command line executables named gs and gsdjvu.
146
147 The DjVuLibre source code contains instruction to compile such a Ghost‐
148 Script executable. More information can be obtained from
149 http://djvu.sourceforge.net/gsdjvu.html.
150
151
153 The output of the djvusep GhostScript driver must be processed by the
154 DjVuLibre program csepdjvu. This program can also be replaced by the
155 the proprietary Lizardtech program msepdjvu. Before processing the in‐
156 put file, program djvudigital searches such an executable. The search
157 starts with the file specified by the environment variable CSEPDJVU and
158 continues with command line executables named msepdjvu and csepdjvu.
159
160
162 The option --poppler=keywords relies on the tool pdftotext that comes
163 with the Poppler library and the tool djvused that comes with djvuli‐
164 bre. Only recent versions of pdftotext that accept the option -bbox
165 are supported. Both tools are searched by first trying the files spec‐
166 ified by the environment variables PDFTOTEXT and DJVUSED, and then try‐
167 ing executables named pdftotext or djvused found along the shell exe‐
168 cutable path.
169
170
172 The first version of this converter was written by Léon Bottou
173 <leonb@users.sourceforge.net> in AT&T Labs. The DjVuLibre version is
174 derived from code graciously released by Lizardtech in January 2004.
175
176
178 Program djvudigital can only process input files that GhostScript can
179 process properly.
180
181
183 djvu(1), csepdjvu(1), c44(1), gs(1), gzip(1)
184
185
186
187DjVuLibre-3.5 1/31/2004 DJVUDIGITAL(1)