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