Fix for the problem that SDL applications exited
[AROS-Contrib.git] / arospdf / doc / xpdfrc.5
blob4e1545527c94f93c71c761031d0d493864807028
1 .\" Copyright 2002-2007 Glyph & Cog, LLC
2 .TH xpdfrc 5 "27 February 2007"
3 .SH NAME
4 xpdfrc \- configuration file for Xpdf tools (version 3.02)
5 .SH DESCRIPTION
6 All of the Xpdf tools read a single configuration file.  If you have a
7 .I .xpdfrc
8 file in your home directory, it will be read.  Otherwise, a
9 system-wide configuration file will be read from
10 .IR /usr/local/etc/xpdfrc ,
11 if it exists.  (This is its default location; depending on build
12 options, it may be placed elsewhere.)  On Win32 systems, the
13 .I xpdfrc
14 file should be placed in the same directory as the executables.
15 .PP
16 The xpdfrc file consists of a series of configuration options, one
17 per line.  Blank lines and lines starting with a \'#' (comments) are
18 ignored.
19 .PP
20 The following sections list all of the configuration options, sorted
21 into functional groups.  There is an examples section at the end.
22 .SH INCLUDE FILES
23 .TP
24 .BI include " config\-file"
25 Includes the specified config file.  The effect of this is equivalent
26 to inserting the contents of
27 .I config\-file
28 directly into the parent config file in place of the
29 .I include
30 command.  Config files can be nested arbitrarily deeply.
31 .SH CHARACTER MAPPING
32 .TP
33 .BI nameToUnicode " map\-file"
34 Specifies a file with the mapping from character names to Unicode.
35 This is used to handle PDF fonts that have valid encodings but no
36 ToUnicode entry.  Each line of a nameToUnicode file looks like this:
38 .I "    " hex\-string name
40 The
41 .I hex\-string
42 is the Unicode (UCS-2) character index, and
43 .I name
44 is the corresponding character name.  Multiple nameToUnicode files can
45 be used; if a character name is given more than once, the code in the
46 last specified file is used.  There is a built-in default
47 nameToUnicode table with all of Adobe's standard character names.
48 .TP
49 .BI cidToUnicode " registry\-ordering map\-file"
50 Specifies the file with the mapping from character collection to
51 Unicode.  Each line of a cidToUnicode file represents one character:
53 .I "    " hex\-string
55 The
56 .I hex\-string
57 is the Unicode (UCS-2) index for that character.  The first line maps
58 CID 0, the second line CID 1, etc.  File size is determined by size of
59 the character collection.  Only one file is allowed per character
60 collection; the last specified file is used.  There are no built-in
61 cidToUnicode mappings.
62 .TP
63 .BI unicodeToUnicode " font\-name\-substring map\-file"
64 This is used to work around PDF fonts which have incorrect Unicode
65 information.  It specifies a file which maps from the given
66 (incorrect) Unicode indexes to the correct ones.  The mapping will be
67 used for any font whose name contains
68 .IR font\-name\-substring .
69 Each line of a unicodeToUnicode file represents one Unicode character:
71 .RI "    " in\-hex " " out\-hex1 " " out\-hex2 " ..."
73 The
74 .I in\-hex
75 field is an input (incorrect) Unicode index, and the rest of the
76 fields are one or more output (correct) Unicode indexes.  Each
77 occurrence of
78 .I in\-hex
79 will be converted to the specified output sequence.
80 .TP
81 .BI unicodeMap " encoding\-name map\-file"
82 Specifies the file with mapping from Unicode to
83 .IR encoding\-name .
84 These encodings are used for X display fonts and text output (see
85 below).  Each line of a unicodeMap file represents a range of one or
86 more Unicode characters which maps linearly to a range in the output
87 encoding:
88 .nf
90 .I "    " in\-start\-hex in\-end\-hex out\-start\-hex
92 .fi
93 Entries for single characters can be abbreviated to:
94 .nf
96 .I "    " in\-hex out\-hex
98 .fi
99 The
100 .I in\-start\-hex
102 .I in\-end\-hex
103 fields (or the single
104 .I in\-hex
105 field) specify the Unicode range.  The
106 .I out\-start\-hex
107 field (or the
108 .I out\-hex
109 field) specifies the start of the output encoding range.  The length
110 of the
111 .I out\-start\-hex
113 .IR out\-hex )
114 string determines the length of the output characters (e.g., UTF-8
115 uses different numbers of bytes to represent characters in different
116 ranges).  Entries must be given in increasing Unicode order.  Only one
117 file is allowed per encoding; the last specified file is used.  The
118 .IR Latin1 ,
119 .IR ASCII7 ,
120 .IR Symbol ,
121 .IR ZapfDingbats ,
122 .IR UTF-8 ,
124 .I UCS-2
125 encodings are predefined.
127 .BI cMapDir " registry\-ordering dir"
128 Specifies a search directory,
129 .IR dir ,
130 for CMaps for the
131 .I registry\-ordering
132 character collection.  There can be multiple directories for a
133 particular collection.  There are no default CMap directories.
135 .BI toUnicodeDir " dir"
136 Specifies a search directory,
137 .IR dir ,
138 for ToUnicode CMaps.  There can be multiple ToUnicode directories.
139 There are no default ToUnicode directories.
140 .SH DISPLAY FONTS
142 .BI displayFontT1 " PDF\-font\-name T1\-file"
143 Maps a PDF font,
144 .IR PDF\-font\-name ,
145 to a Type 1 font for display.  The Type 1 font file,
146 .IR T1\-file ,
147 should be a standard .pfa or .pfb file.
149 .BI displayFontTT " PDF\-font\-name TT\-file"
150 Maps a PDF font,
151 .IR PDF\-font\-name ,
152 to a TrueType font for display.  The TrueType font file,
153 .IR TT\-file ,
154 should be a standard .ttf file.
156 .BI displayNamedCIDFontT1 " PDF\-font\-name T1\-file"
157 Maps a specific PDF CID (16-bit) font,
158 .IR PDF\-font\-name ,
159 to a CID font (16-bit PostScript font), for display.  There are no
160 default CID font mappings.
162 .BI displayCIDFontT1 " registry\-ordering T1\-file"
163 Maps the
164 .I registry\-ordering
165 character collection to a CID font (16-bit PostScript font), for
166 display.  This mapping is used if the font name doesn't match any of
167 the fonts declared with displayNamedCIDFont* commands.  There are no
168 default CID font mappings.
170 .BI displayNamedCIDFontTT " PDF\-font\-name TT\-file"
171 Maps a specific PDF CID (16-bit) font,
172 .IR PDF\-font\-name ,
173 to a (16-bit) TrueType font, for display.  There are no default CID
174 font mappings.
176 .BI displayCIDFontTT " registry\-ordering TT\-file"
177 Maps the
178 .I registry\-ordering
179 character collection to a (16-bit) TrueType font, for display.  This
180 mapping is used if the font name doesn't match any of the fonts
181 declared with displayNamedCIDFont* commands.  There are no default CID
182 font mappings.
184 .BI fontDir " dir"
185 Specifies a search directory for external font files.  There can be
186 multiple fontDir directories.  If a PDF file uses a font but doesn't
187 embed it, these directories will be searched for a matching font file.
188 These fonts are used by both xpdf (for display) and pdftops (for
189 embedding in the generated PostScript).  Type 1 fonts must have a
190 suffix of ".pfa", ".pfb", ".ps", or no suffix at all.  TrueType fonts
191 must have a ".ttf" suffix.  Other files in these directories will be
192 ignored.  There are no default fontDir directories.
193 .SH POSTSCRIPT CONTROL
195 .BI psPaperSize " width(pts) height(pts)"
196 Sets the paper size for PostScript output.  The
197 .I width
199 .I height
200 parameters give the paper size in PostScript points (1 point = 1/72
201 inch).
203 .BR psPaperSize " letter | legal | A4 | A3 | match"
204 Sets the paper size for PostScript output to a standard size.  The
205 default paper size is set when xpdf and pdftops are built, typically
206 to "letter" or "A4".  This can also be set to "match", which will set
207 the paper size to match the size specified in the PDF file.
209 .BR psImageableArea " llx lly urx ury"
210 Sets the imageable area for PostScript output.  The four integers are
211 the coordinates of the lower-left and upper-right corners of the
212 imageable region, specified in points (with the origin being the
213 lower-left corner of the paper).  This defaults to the full paper
214 size; the psPaperSize option will reset the imageable area
215 coordinates.
217 .BR psCrop " yes | no"
218 If set to "yes", PostScript output is cropped to the CropBox specified
219 in the PDF file; otherwise no cropping is done.  This defaults to
220 "yes".
222 .BR psExpandSmaller " yes | no"
223 If set to "yes", PDF pages smaller than the PostScript imageable area
224 are expanded to fill the imageable area.  Otherwise, no scalling is
225 done on smaller pages.  This defaults to "no".
227 .BR psShrinkLarger " yes | no"
228 If set to yes, PDF pages larger than the PostScript imageable area are
229 shrunk to fit the imageable area.  Otherwise, no scaling is done on
230 larger pages.  This defaults to "yes".
232 .BR psCenter " yes | no"
233 If set to yes, PDF pages smaller than the PostScript imageable area
234 (after any scaling) are centered in the imageable area.  Otherwise,
235 they are aligned at the lower-left corner of the imageable area.  This
236 defaults to "yes".
238 .BR psDuplex " yes | no"
239 If set to "yes", the generated PostScript will set the "Duplex"
240 pagedevice entry.  This tells duplex-capable printers to enable
241 duplexing.  This defaults to "no".
243 .BR psLevel " level1 | level1sep | level2 | level2sep | level3 | level3Sep"
244 Sets the PostScript level to generate.  This defaults to "level2".
246 .BI psFont " PDF\-font\-name PS\-font\-name"
247 When the
248 .I PDF\-font\-name
249 font is used in a PDF file, it will be translated to the PostScript
250 font
251 .IR PS\-font\-name ,
252 which is assumed to be resident in the printer.  Typically,
253 .I PDF\-font\-name
255 .I PS\-font\-name
256 are the same.  By default, only the Base-14 fonts are assumed to be
257 resident.
259 .BI psNamedFont16 " PDF\-font\-name wMode PS\-font\-name encoding"
260 When the 16-bit font
261 .I PDF\-font\-name
262 is used in a PDF file with the
263 .I wMode
264 writing mode and is not embedded, the
265 .I PS\-font\-name
266 font is substituted for it.  The writing mode must be either \'H' for
267 horizontal or \'V' for vertical.  The
268 .I PS\-font\-name
269 font is assumed to be resident in the printer and to use the specified
270 encoding (which must have been defined with the unicodeMap command).
272 .BI psFont16 " registry\-ordering wMode PS\-font\-name encoding"
273 When a 16-bit font using the
274 .I registry\-ordering
275 character collection and 
276 .I wMode
277 writing mode is not embedded and does not match any of the fonts
278 declared in psNamedFont16 commands, the
279 .I PS\-font\-name
280 font is substituted for it.  The writing mode must be either \'H' for
281 horizontal or \'V' for vertical.  The
282 .I PS\-font\-name
283 font is assumed to be resident in the printer and to use the specified
284 writing mode and encoding (which must have been defined with the
285 unicodeMap command).
287 .BR psEmbedType1Fonts " yes | no"
288 If set to "no", prevents embedding of Type 1 fonts in generated
289 PostScript.  This defaults to "yes".
291 .BR psEmbedTrueTypeFonts " yes | no"
292 If set to "no", prevents embedding of TrueType fonts in generated
293 PostScript.  This defaults to "yes".
295 .BR psEmbedCIDTrueTypeFonts " yes | no"
296 If set to "no", prevents embedding of CID TrueType fonts in generated
297 PostScript.  For Level 3 PostScript, this generates a CID font, for
298 lower levels it generates a non-CID composite font.
300 .BR psEmbedCIDPostScriptFonts " yes | no"
301 If set to "no", prevents embedding of CID PostScript fonts in
302 generated PostScript.  For Level 3 PostScript, this generates a CID
303 font, for lower levels it generates a non-CID composite font.
305 .BR psPreload " yes | no"
306 If set to "yes", PDF forms are converted to PS procedures, and image
307 data is preloaded.  This uses more memory in the PostScript
308 interpreter, but generates significantly smaller PS files in
309 situations where, e.g., the same image is drawn on every page of a
310 long document.  This defaults to "no".
312 .BR psOPI " yes | no"
313 If set to "yes", generates PostScript OPI comments for all images and
314 forms which have OPI information.  This option is only available if
315 the Xpdf tools were compiled with OPI support.  This defaults to "no".
317 .BR psASCIIHex " yes | no"
318 If set to "yes", the ASCIIHexEncode filter will be used instead of
319 ASCII85Encode for binary data.  This defaults to "no".
321 .BI psFile " file\-or\-command"
322 Sets the default PostScript file or print command for xpdf.  Commands
323 start with a \'|' character; anything else is a file.  If the file
324 name or command contains spaces it must be quoted.  This defaults to
325 unset, which tells xpdf to generate a name of the form <file>.ps for a
326 PDF file <file>.pdf.
328 .BI fontDir " dir"
329 See the description above, in the DISPLAY FONTS section.
330 .SH TEXT CONTROL
332 .BI textEncoding " encoding\-name"
333 Sets the encoding to use for text output.  (This can be overridden
334 with the "-enc" switch on the command line.)  The
335 .I encoding\-name
336 must be defined with the unicodeMap command (see above).  This
337 defaults to "Latin1".
339 .BR textEOL " unix | dos | mac"
340 Sets the end-of-line convention to use for text output.  The options
341 are:
344     unix = LF
345     dos  = CR+LF
346     mac  = CR
349 (This can be overridden with the "-eol" switch on the command line.)
350 The default value is based on the OS where xpdf and pdftotext were
351 built.
353 .BR textPageBreaks " yes | no"
354 If set to "yes", text extraction will insert page breaks (form feed
355 characters) between pages.  This defaults to "yes".
357 .BR textKeepTinyChars " yes | no"
358 If set to "yes", text extraction will keep all characters.  If set to
359 "no", text extraction will discard tiny (smaller than 3 point)
360 characters after the first 50000 per page, avoiding extremely slow run
361 times for PDF files that use special fonts to do shading or
362 cross-hatching.  This defaults to "no".
363 .SH MISCELLANEOUS SETTINGS
365 .BR initialZoom " \fIpercentage\fR | page | width"
366 Sets the initial zoom factor.  A number specifies a zoom percentage,
367 where 100 means 72 dpi.  You may also specify \'page', to fit the page
368 to the window size, or \'width', to fit the page width to the window
369 width.
371 .BR continuousView " yes | no"
372 If set to "yes", xpdf will start in continuous view mode, i.e., with
373 one vertical screoll bar for the whole document.  This defaults to
374 "no".
376 .BR enableT1lib " yes | no"
377 Enables or disables use of t1lib (a Type 1 font rasterizer).  This is
378 only relevant if the Xpdf tools were built with t1lib support.
379 ("enableT1lib" replaces the old "t1libControl" option.)  This option
380 defaults to "yes".
382 .BR enableFreeType " yes | no"
383 Enables or disables use of FreeType (a TrueType / Type 1 font
384 rasterizer).  This is only relevant if the Xpdf tools were built with
385 FreeType support.  ("enableFreeType" replaces the old
386 "freetypeControl" option.)  This option defaults to "yes".
388 .BR antialias " yes | no"
389 Enables or disables font anti-aliasing in the PDF rasterizer.  This
390 option affects all font rasterizers.  ("antialias" replaces the
391 anti-aliasing control provided by the old "t1libControl" and
392 "freetypeControl" options.)  This default to "yes".
394 .BR vectorAntialias " yes | no"
395 Enables or disables anti-aliasing of vector graphics in the PDF
396 rasterizer.  This defaults to "yes".
398 .BR strokeAdjust " yes | no"
399 Enables or disables stroke adjustment.  This defaults to "yes".
401 .BR screenType " dispersed | clustered | stochasticClustered"
402 Sets the halftone screen type, which will be used when generating a
403 monochrome (1-bit) bitmap.  The three options are dispersed-dot
404 dithering, clustered-dot dithering (with a round dot and 45-degree
405 screen angle), and stochastic clustered-dot dithering.  By default,
406 "stochasticClustered" is used for resolutions of 300 dpi and higher,
407 and "dispersed" is used for resolutions lower then 300 dpi.
409 .BI screenSize " integer"
410 Sets the size of the (square) halftone screen threshold matrix.  By
411 default, this is 4 for dispersed-dot dithering, 10 for clustered-dot
412 dithering, and 100 for stochastic clustered-dot dithering.
414 .BI screenDotRadius " integer"
415 Sets the halftone screen dot radius.  This is only used when
416 screenType is set to stochasticClustered, and it defaults to 2.  In
417 clustered-dot mode, the dot radius is half of the screen size.
418 Dispersed-dot dithering doesn't have a dot radius.
420 .BI screenGamma " float"
421 Sets the halftone screen gamma correction parameter.  Gamma values
422 greater than 1 make the output brighter; gamma values less than 1 make
423 it darker.  The default value is 1.
425 .BI screenBlackThreshold " float"
426 When halftoning, all values below this threshold are forced to solid
427 black.  This parameter is a floating point value between 0 (black) and
428 1 (white).  The default value is 0.
430 .BI screenWhiteThreshold " float"
431 When halftoning, all values above this threshold are forced to solid
432 white.  This parameter is a floating point value between 0 (black) and
433 1 (white).  The default value is 1.
435 .BI urlCommand " command"
436 Sets the command executed when you click on a URL link.  The string
437 "%s" will be replaced with the URL.  (See the example below.)  This
438 has no default value.
440 .BI movieCommand " command"
441 Sets the command executed when you click on a movie annotation.  The
442 string "%s" will be replaced with the movie file name.  This has no
443 default value.
445 .BI mapNumericCharNames " yes | no"
446 If set to "yes", the Xpdf tools will attempt to map various numeric
447 character names sometimes used in font subsets.  In some cases this
448 leads to usable text, and in other cases it leads to gibberish --
449 there is no way for Xpdf to tell.  This defaults to "yes".
451 .BI mapUnknownCharNames " yes | no"
452 If set to "yes", and mapNumericCharNames is set to "no", the Xpdf
453 tools will apply a simple pass-through mapping (Unicode index =
454 character code) for all unrecognized glyph names.  In some cases, this
455 leads to usable text, and in other cases it leads to gibberish --
456 there is no way for Xpdf to tell.  This defaults to "no".
458 .BI bind " modifiers-key context command ..."
459 Add a key or mouse button binding.
460 .I Modifiers
461 can be zero or more of:
464     shift-
465     ctrl-
466     alt-
469 .I Key
470 can be a regular ASCII character, or any one of:
473     space
474     tab
475     return
476     enter
477     backspace
478     insert
479     delete
480     home
481     end
482     pgup
483     pgdn
484     left / right / up / down        (arrow keys)
485     f1 .. f35                       (function keys)
486     mousePress1 .. mousePress7      (mouse buttons)
487     mouseRelease1 .. mouseRelease7  (mouse buttons)
490 .I Context
491 is either "any" or a comma-separated combination of:
494     fullScreen / window       (full screen mode on/off)
495     continuous / singlePage   (continuous mode on/off)
496     overLink / offLink        (mouse over link or not)
497     scrLockOn / scrLockOff    (scroll lock on/off)
500 The context string can include only one of each pair in the above
501 list.
503 .I Command
504 is an Xpdf command (see the COMMANDS section of the
505 .BR xpdf (1)
506 man page for details).  Multiple commands are separated by whitespace.
508 The bind command replaces any existing binding, but only if it was
509 defined for the exact same modifiers, key, and context.  All tokens
510 (modifiers, key, context, commands) are case-sensitive.
512 Example key bindings:
515     # bind ctrl-a in any context to the nextPage
516     # command
517     bind ctrl-a any nextPage
519     # bind uppercase B, when in continuous mode
520     # with scroll lock on, to the reload command
521     # followed by the prevPage command
522     bind B continuous,scrLockOn reload prevPage
525 See the
526 .BR xpdf (1)
527 man page for more examples.
529 .BI unbind " modifiers-key context"
530 Removes a key binding established with the bind command.  This is most
531 useful to remove default key bindings before establishing new ones
532 (e.g., if the default key binding is given for "any" context, and you
533 want to create new key bindings for multiple contexts).
535 .BI printCommands " yes | no"
536 If set to "yes", drawing commands are printed as they're executed
537 (useful for debugging).  This defaults to "no".
539 .BI errQuiet " yes | no"
540 If set to "yes", this suppresses all error and warning messages from
541 all of the Xpdf tools.  This defaults to "no".
542 .SH EXAMPLES
543 The following is a sample xpdfrc file.
546 # from the Thai support package
547 nameToUnicode /usr/local/share/xpdf/Thai.nameToUnicode
549 # from the Japanese support package
550 cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/Adobe-Japan1.cidToUnicode
551 unicodeMap   JISX0208     /usr/local/share/xpdf/JISX0208.unicodeMap
552 cMapDir      Adobe-Japan1 /usr/local/share/xpdf/cmap/Adobe-Japan1
554 # use the Base-14 Type 1 fonts from ghostscript
555 displayFontT1 Times-Roman           /usr/local/share/ghostscript/fonts/n021003l.pfb
556 displayFontT1 Times-Italic          /usr/local/share/ghostscript/fonts/n021023l.pfb
557 displayFontT1 Times-Bold            /usr/local/share/ghostscript/fonts/n021004l.pfb
558 displayFontT1 Times-BoldItalic      /usr/local/share/ghostscript/fonts/n021024l.pfb
559 displayFontT1 Helvetica             /usr/local/share/ghostscript/fonts/n019003l.pfb
560 displayFontT1 Helvetica-Oblique     /usr/local/share/ghostscript/fonts/n019023l.pfb
561 displayFontT1 Helvetica-Bold        /usr/local/share/ghostscript/fonts/n019004l.pfb
562 displayFontT1 Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
563 displayFontT1 Courier               /usr/local/share/ghostscript/fonts/n022003l.pfb
564 displayFontT1 Courier-Oblique       /usr/local/share/ghostscript/fonts/n022023l.pfb
565 displayFontT1 Courier-Bold          /usr/local/share/ghostscript/fonts/n022004l.pfb
566 displayFontT1 Courier-BoldOblique   /usr/local/share/ghostscript/fonts/n022024l.pfb
567 displayFontT1 Symbol                /usr/local/share/ghostscript/fonts/s050000l.pfb
568 displayFontT1 ZapfDingbats          /usr/local/share/ghostscript/fonts/d050000l.pfb
570 # use the Bakoma Type 1 fonts
571 # (this assumes they happen to be installed in /usr/local/fonts/bakoma)
572 fontDir /usr/local/fonts/bakoma
574 # set some PostScript options
575 psPaperSize          letter
576 psDuplex             no
577 psLevel              level2
578 psEmbedType1Fonts    yes
579 psEmbedTrueTypeFonts yes
580 psFile               "| lpr -Pprinter5"
582 # assume that the PostScript printer has the Univers and
583 # Univers-Bold fonts
584 psFont Univers      Univers
585 psFont Univers-Bold Univers-Bold
587 # set the text output options
588 textEncoding UTF-8
589 textEOL      unix
591 # misc options
592 t1libControl    low
593 freetypeControl low
594 urlCommand      "netscape -remote 'openURL(%s)'"
597 .SH FILES
599 .B /usr/local/etc/xpdfrc
600 This is the default location for the system-wide configuration file.
601 Depending on build options, it may be placed elsewhere.
603 .B $HOME/.xpdfrc
604 This is the user's configuration file.  If it exists, it will be read
605 in place of the system-wide file.
606 .SH AUTHOR
607 The Xpdf software and documentation are copyright 1996-2007 Glyph &
608 Cog, LLC.
609 .SH "SEE ALSO"
610 .BR xpdf (1),
611 .BR pdftops (1),
612 .BR pdftotext (1),
613 .BR pdfinfo (1),
614 .BR pdftoppm (1),
615 .BR pdfimages (1)
617 .B http://www.foolabs.com/xpdf/