File: djvudigital.1

package info (click to toggle)
djvulibre 3.5.27.1-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,976 kB
  • ctags: 8,037
  • sloc: cpp: 65,455; xml: 5,723; ansic: 4,640; sh: 846; makefile: 315
file content (307 lines) | stat: -rw-r--r-- 8,434 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
.\" Copyright (c) 2001-2003 Leon Bottou, Yann Le Cun, Patrick Haffner,
.\" Copyright (c) 2001 AT&T Corp., and Lizardtech, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual. Otherwise check the web site
.\" of the Free Software Foundation at http://www.fsf.org.
.TH DJVUDIGITAL 1 "1/31/2004" "DjVuLibre-3.5" "DjVuLibre-3.5"
.SH NAME
djvudigital \- creates DjVu files from PS or PDF files.

.SH SYNOPSIS
.BI "djvudigital  [" "options" "] " "inputfile" " [" "outputfile" "]"

.SH DESCRIPTION
This program creates a DjVu file
from the PostScript
.BR "" "(" ".ps" "),"
GZipped PostScript
.BR "" "(" ".ps.gz" "),"
Encapsulated PostScript
.BR "" "(" ".eps" "),"
or Portable Document Format 
.BR "" "(" ".pdf" ")"
file
.IR inputfile .

The output file name is either given by argument
.I outputfile
or generated by replacing the input file name 
suffixes by the DjVu suffix
.BR "" "(" ".djvu" ")."

.SH PREREQUISITES

This program depends on a specific GhostScript driver.
If your GhostScript program does not provide this driver,
please check
.BR http://djvu.sourceforge.net/gsdjvu.html .

.SH OPTIONS
.TP
.BR "--verbose" ", " "-v"
Displays more informational messages while
converting the file.
.TP
.BR "--quiet" ", " "-q"
Do not display informational messages while
converting the file.
.TP
.BI "--dpi=" "resolution"
Specify the desired resolution to 
.I resolution
dots per inch.
The default is 300 dpi.
.TP
.BI "--psrotate=" "angle"
Rotate the PostScript file by 
.I angle
degrees clockwise. 
Only the values
.BR 0 ", " 90 ", " 180 ", and " 270
are supported.  
This option only applies to PostScript files.
PDF files are always converted according to
their native orientation.
.TP
.BI "--epsf=" "disposition"
Specify how to handle Encapsulated PostScript files. 
Argument
.I disposition
can take the values
.BR crop ", " fit ", and " ignore "."
The default disposition
.B crop
creates a DjVu file whose size matches the bounding box of 
the Encapsulated PostScript file. Value
.B fit
rescales the graphics to the default page size. 
Value
.B ignore
disables all Encapsulated PostScript specific code.
This option requires Ghostscript 7.07 or better.
.TP
.BI "--exact-color"
Enables a more accurate rendering of the colors.
This option requires GhostScript 6.52 or better.
.TP
.BI "--threshold=" "thres"
Specify a threshold for the foreground/background separation code.
Acceptable values of
.I thres
range from 0 to 100. Larger values place more 
information into the foreground layer.
The default threshold value is 80.
.TP
.BI "--bg-subsample=" "sub"
Specify the background subsampling ratio.
Argument 
.I sub
must be an integer between 1 and 6.
The default value is 3.
.TP
.BI "--bg-slices=" "n" "+...+" "n"
Specify the encoding quality of the background layer. 
The syntax for the argument is similar to that described for the
.B -slice
option of command
.BR c44 .
The default is
.BR 72+11+10+10 .
.TP
.BI "--fg-colors=" ncolors
Specify the maximum number of distinct colors in the foreground layer.
Argument 
.I ncolors
can take integer values between 1 and 4000.
The default value is 256.
.TP
.BI "--fg-image-colors=" ncolors
Specify the maximum number of distinct colors in an image for 
considering encoding it into the foreground layer.
Argument 
.I ncolors
can take integer values between 1 and 4000.
The default value is 256.
.TP
.BI "--words"
Extract the text from the PostScript code and
incorporates this information into the DjVu file.
This option records the location of every word.
.TP
.BI "--lines"
Extract the text from the PostScript code and
incorporates this information into the DjVu file.
This option saves a few bytes by only recording the 
location of each line.
.TP
.BI "--gsarg=" arg1 "[," arg2 ",...," argN "]"
Insert extra arguments on the GhostScript command line.
.TP
.BI "--cseparg=" arg1 "[," arg2 ",...," argN "]"
Insert extra arguments on the command line of
program
.BR csepdjvu " or " msepdjvu "."
.TP
.BI "--poppler=" "keywords"
This option causes
.B djvudigital
to extract additional information from PDF files using the tool
.B pdftotext
that comes bundled with the Poppler library.
Selected information is then added to the djvu file
as a postprocessing step. This option is ignored
when the input file is not a PDF file.
Argument
.I keywords
is a comma separated list of keywords.
When this list contains keyword
.BR meta ,
the metadata extracted by 
.B pdftotext
is inserted into the djvu file.
When this list contains keyword
.BR text ,
the textual information extracted by
.B pdftotext
is inserted into the djvu file,
possibly replacing the information
gathered using the options
.BR --words
or
.BR --lines .
This is useful for instance when a scanned
PDF file contains a hidden text layer that
is not recognized by Ghostscript and therefore
not passed to the djvudigital backend.
.TP
.BI "--sepfile"
Produces a separated data file instead of a DjVu file. Program
.BR csepdjvu 
can then convert the separated data file into a DjVu file.
.TP
.BI "--check"
Display the names of the two auxiliary programs found by
.BR djvudigital ,
namely a suitable ghostscript interpreter and a suitable backend encoder.
See the next two section for details.
.TP
.BI "--dryrun"
Simply display the ghostscript command line generated by
.BR djvudigital
without running it.
No output file is produced
.TP
.BI "--help"
Display the manual page for 
.BR djvudigital .
.PP

.SH GHOSTSCRIPT ISSUES

Program
.B djvudigital 
internally relies on a specific Ghostscript driver named
.BR djvusep .
This driver analyzes the logical structure of the sequence
of PostScript rendering commands and decides to execute 
each command into either the foreground or the background layer.
The GhostScript driver produces a separated data file 
that is then compressed using the DjVuLibre program
.BR csepdjvu .

Before processing the input file, program
.B djvudigital
searches a Ghostscript executable providing the
.B djvusep
driver. The search starts with the file specified
by the environment variable
.B GSDJVU
and continues with command line executables named
.BR gs " and " gsdjvu "."

The DjVuLibre source code contains instruction
to compile such a GhostScript executable.
More information can be obtained from
.BR http://djvu.sourceforge.net/gsdjvu.html .

.SH CSEPDJVU ISSUES

The output of the
.B djvusep
GhostScript driver must be processed by 
the DjVuLibre program
.BR csepdjvu .
This program can also be replaced by the 
the proprietary Lizardtech program
.BR msepdjvu .
Before processing the input file, program
.B djvudigital
searches such an executable.
The search starts with the file specified
by the environment variable
.B CSEPDJVU
and continues with command line executables named
.BR msepdjvu " and " csepdjvu "."

.SH OTHER PROGRAMS

The option
.BI "--poppler=" "keywords"
relies on the tool
.B pdftotext
that comes with the Poppler library
and the tool
.B djvused
that comes with djvulibre.
Only recent versions of 
.B pdftotext
that accept the option
.B -bbox
are supported.
Both tools are searched by first trying
the files specified by the environment variables
.B PDFTOTEXT
and 
.BR DJVUSED ,
and then trying executables named 
.B pdftotext
or 
.B djvused 
found along the shell executable path.

.SH CREDITS

The first version of this converter was written 
by L\('eon Bottou <leonb@users.sourceforge.net>
in AT&T Labs.  The DjVuLibre version is derived 
from code graciously released by Lizardtech in 
January 2004.

.SH BUGS

Program
.B djvudigital
can only process input files that GhostScript can process properly.

.SH SEE ALSO
.BR djvu (1),
.BR csepdjvu (1),
.BR c44 (1),
.BR gs (1),
.BR gzip (1)