1xpdfrc(5) File Formats Manual xpdfrc(5)
2
3
4
6 xpdfrc - configuration file for Xpdf tools (version 3.03)
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 text output (see below). Each line
77 of a unicodeMap file represents a range of one or more Unicode
78 characters which maps linearly to a range in the output encod‐
79 ing:
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 fontFile PDF-font-name font-file
111 Maps a PDF font, PDF-font-name, to a font for display or Post‐
112 Script output. The font file, font-file, can be any type
113 allowed in a PDF file. This command can be used for 8-bit or
114 16-bit (CID) fonts.
115
116 fontDir dir
117 Specifies a search directory for font files. There can be mul‐
118 tiple fontDir commands; all of the specified directories will be
119 searched in order. The font files can be Type 1 (.pfa or .pfb)
120 or TrueType (.ttf or .ttc); other files in the directory will be
121 ignored. The font file name (not including the extension) must
122 exactly match the PDF font name. This search is performed if
123 the font name doesn't match any of the fonts declared with the
124 fontFile command. There are no default fontDir directories.
125
126 fontFileCC registry-ordering font-file
127 Maps the registry-ordering character collection to a font for
128 display or PostScript output. This mapping is used if the font
129 name doesn't match any of the fonts declared with the fontFile,
130 fontDir, psResidentFont16, or psResidentFontCC commands.
131
133 psFontPassthrough yes | no
134 If set to "yes", pass 8-bit font names through to the PostScript
135 output without substitution. Fonts which are not embedded in
136 the PDF file are expected to be available on the printer. This
137 defaults to "no".
138
139 psResidentFont PDF-font-name PS-font-name
140 When the 8-bit font PDF-font-name is used (without embedding) in
141 a PDF file, it will be translated to the PostScript font
142 PS-font-name, which is assumed to be resident in the printer.
143 Typically, PDF-font-name and PS-font-name are the same. By
144 default, only the Base-14 fonts are assumed to be resident.
145
146 psResidentFont16 PDF-font-name wMode PS-font-name encoding
147 When the 16-bit (CID) font PDF-font-name with writing mode wMode
148 is used (without embedding) in a PDF file, it will be translated
149 to the PostScript font PS-font-name, which is assumbed to be
150 resident in the printer. The writing mode must be either ´H'
151 for horizontal or ´V' for vertical. The resident font is
152 assumed to use the specified encoding (which must have been
153 defined with the unicodeMap command).
154
155 psResidentFontCC registry-ordering wMode PS-font-name encoding
156 When a 16-bit (CID) font using the registry-ordering character
157 collection and wMode writing mode is used (without embedding) in
158 a PDF file, the PostScript font, PS-font-name, is substituted
159 for it. The substituted font is assumbed to be resident in the
160 printer. The writing mode must be either ´H' for horizontal or
161 ´V' for vertical. The resident font is assumed to use the spec‐
162 ified encoding (which must have been defined with the unicodeMap
163 command).
164
165 psEmbedType1Fonts yes | no
166 If set to "no", prevents embedding of Type 1 fonts in generated
167 PostScript. This defaults to "yes".
168
169 psEmbedTrueTypeFonts yes | no
170 If set to "no", prevents embedding of TrueType fonts in gener‐
171 ated PostScript. This defaults to "yes".
172
173 psEmbedCIDTrueTypeFonts yes | no
174 If set to "no", prevents embedding of CID TrueType fonts in gen‐
175 erated PostScript. For Level 3 PostScript, this generates a CID
176 font, for lower levels it generates a non-CID composite font.
177 This defaults to "yes".
178
179 psEmbedCIDPostScriptFonts yes | no
180 If set to "no", prevents embedding of CID PostScript fonts in
181 generated PostScript. For Level 3 PostScript, this generates a
182 CID font, for lower levels it generates a non-CID composite
183 font. This defaults to "yes".
184
186 psPaperSize width(pts) height(pts)
187 Sets the paper size for PostScript output. The width and height
188 parameters give the paper size in PostScript points (1 point =
189 1/72 inch).
190
191 psPaperSize letter | legal | A4 | A3 | match
192 Sets the paper size for PostScript output to a standard size.
193 The default paper size is set when xpdf and pdftops are built,
194 typically to "letter" or "A4". This can also be set to "match",
195 which will set the paper size to match the size specified in the
196 PDF file.
197
198 psImageableArea llx lly urx ury
199 Sets the imageable area for PostScript output. The four inte‐
200 gers are the coordinates of the lower-left and upper-right cor‐
201 ners of the imageable region, specified in points (with the ori‐
202 gin being the lower-left corner of the paper). This defaults to
203 the full paper size; the psPaperSize option will reset the
204 imageable area coordinates.
205
206 psCrop yes | no
207 If set to "yes", PostScript output is cropped to the CropBox
208 specified in the PDF file; otherwise no cropping is done. This
209 defaults to "yes".
210
211 psExpandSmaller yes | no
212 If set to "yes", PDF pages smaller than the PostScript imageable
213 area are expanded to fill the imageable area. Otherwise, no
214 scalling is done on smaller pages. This defaults to "no".
215
216 psShrinkLarger yes | no
217 If set to yes, PDF pages larger than the PostScript imageable
218 area are shrunk to fit the imageable area. Otherwise, no scal‐
219 ing is done on larger pages. This defaults to "yes".
220
221 psCenter yes | no
222 If set to yes, PDF pages smaller than the PostScript imageable
223 area (after any scaling) are centered in the imageable area.
224 Otherwise, they are aligned at the lower-left corner of the
225 imageable area. This defaults to "yes".
226
227 psDuplex yes | no
228 If set to "yes", the generated PostScript will set the "Duplex"
229 pagedevice entry. This tells duplex-capable printers to enable
230 duplexing. This defaults to "no".
231
232 psLevel level1 | level1sep | level2 | level2sep | level3 | level3Sep
233 Sets the PostScript level to generate. This defaults to
234 "level2".
235
236 psPreload yes | no
237 If set to "yes", PDF forms are converted to PS procedures, and
238 image data is preloaded. This uses more memory in the Post‐
239 Script interpreter, but generates significantly smaller PS files
240 in situations where, e.g., the same image is drawn on every page
241 of a long document. This defaults to "no".
242
243 psOPI yes | no
244 If set to "yes", generates PostScript OPI comments for all
245 images and forms which have OPI information. This option is
246 only available if the Xpdf tools were compiled with OPI support.
247 This defaults to "no".
248
249 psASCIIHex yes | no
250 If set to "yes", the ASCIIHexEncode filter will be used instead
251 of ASCII85Encode for binary data. This defaults to "no".
252
253 psUncompressPreloadedImages yes | no
254 If set to "yes", all preloaded images in PS files will uncom‐
255 pressed. If set to "no", the original compressed images will be
256 used when possible. The "yes" setting is useful to work around
257 certain buggy PostScript interpreters. This defaults to "no".
258
259 psRasterResolution float
260 Set the resolution (in dpi) for rasterized pages in PostScript
261 output. (Pdftops will rasterize pages which use transparency.)
262 This defaults to 300.
263
264 psRasterMono yes | no
265 If set to "yes", rasterized pages in PS files will be monochrome
266 (8-bit gray) instead of color. This defaults to "no".
267
268 psAlwaysRasterize yes | no
269 If set to "yes", all PostScript output will be rasterized. This
270 defaults to "no".
271
272 psFile file-or-command
273 Sets the default PostScript file or print command for xpdf.
274 Commands start with a ´|' character; anything else is a file.
275 If the file name or command contains spaces it must be quoted.
276 This defaults to unset, which tells xpdf to generate a name of
277 the form <file>.ps for a PDF file <file>.pdf.
278
279 fontDir dir
280 See the description above, in the DISPLAY FONTS section.
281
283 textEncoding encoding-name
284 Sets the encoding to use for text output. (This can be overrid‐
285 den with the "-enc" switch on the command line.) The encod‐
286 ing-name must be defined with the unicodeMap command (see
287 above). This defaults to "Latin1".
288
289 textEOL unix | dos | mac
290 Sets the end-of-line convention to use for text output. The
291 options are:
292
293 unix = LF
294 dos = CR+LF
295 mac = CR
296
297 (This can be overridden with the "-eol" switch on the command
298 line.) The default value is based on the OS where xpdf and
299 pdftotext were built.
300
301 textPageBreaks yes | no
302 If set to "yes", text extraction will insert page breaks (form
303 feed characters) between pages. This defaults to "yes".
304
305 textKeepTinyChars yes | no
306 If set to "yes", text extraction will keep all characters. If
307 set to "no", text extraction will discard tiny (smaller than 3
308 point) characters after the first 50000 per page, avoiding
309 extremely slow run times for PDF files that use special fonts to
310 do shading or cross-hatching. This defaults to "no".
311
313 initialZoom percentage | page | width
314 Sets the initial zoom factor. A number specifies a zoom per‐
315 centage, where 100 means 72 dpi. You may also specify ´page',
316 to fit the page to the window size, or ´width', to fit the page
317 width to the window width.
318
319 continuousView yes | no
320 If set to "yes", xpdf will start in continuous view mode, i.e.,
321 with one vertical screoll bar for the whole document. This
322 defaults to "no".
323
324 enableT1lib yes | no
325 Enables or disables use of t1lib (a Type 1 font rasterizer).
326 This is only relevant if the Xpdf tools were built with t1lib
327 support. ("enableT1lib" replaces the old "t1libControl"
328 option.) This option defaults to "yes".
329
330 enableFreeType yes | no
331 Enables or disables use of FreeType (a TrueType / Type 1 font
332 rasterizer). This is only relevant if the Xpdf tools were built
333 with FreeType support. ("enableFreeType" replaces the old
334 "freetypeControl" option.) This option defaults to "yes".
335
336 enableFreeType yes | no
337 Enables or disables use of FreeType (a TrueType / Type 1 font
338 rasterizer). This is only relevant if the Xpdf tools were built
339 with FreeType support. ("enableFreeType" replaces the old
340 "freetypeControl" option.) This option defaults to "yes".
341
342 disableFreeTypeHinting yes | no
343 If this is set to "yes", FreeType hinting will be forced off.
344 This option defaults to "no".
345
346 antialias yes | no
347 Enables or disables font anti-aliasing in the PDF rasterizer.
348 This option affects all font rasterizers. ("antialias" replaces
349 the anti-aliasing control provided by the old "t1libControl" and
350 "freetypeControl" options.) This default to "yes".
351
352 vectorAntialias yes | no
353 Enables or disables anti-aliasing of vector graphics in the PDF
354 rasterizer. This defaults to "yes".
355
356 antialiasPrinting yes | no
357 If this is "yes", bitmaps sent to the printer will be
358 antialiased (according to the "antialias" and "vectorAntialias"
359 settings). If this is "no", printed bitmaps will not be
360 antialiased. This defaults to "no".
361
362 strokeAdjust yes | no
363 Enables or disables stroke adjustment. Stroke adjustment moves
364 horizontal and vertical lines by up to half a pixel to make them
365 look "cleaner" when vector anti-aliasing is enabled. This
366 defaults to "yes".
367
368 screenType dispersed | clustered | stochasticClustered
369 Sets the halftone screen type, which will be used when generat‐
370 ing a monochrome (1-bit) bitmap. The three options are dis‐
371 persed-dot dithering, clustered-dot dithering (with a round dot
372 and 45-degree screen angle), and stochastic clustered-dot
373 dithering. By default, "stochasticClustered" is used for reso‐
374 lutions of 300 dpi and higher, and "dispersed" is used for reso‐
375 lutions lower then 300 dpi.
376
377 screenSize integer
378 Sets the size of the (square) halftone screen threshold matrix.
379 By default, this is 4 for dispersed-dot dithering, 10 for clus‐
380 tered-dot dithering, and 100 for stochastic clustered-dot
381 dithering.
382
383 screenDotRadius integer
384 Sets the halftone screen dot radius. This is only used when
385 screenType is set to stochasticClustered, and it defaults to 2.
386 In clustered-dot mode, the dot radius is half of the screen
387 size. Dispersed-dot dithering doesn't have a dot radius.
388
389 screenGamma float
390 Sets the halftone screen gamma correction parameter. Gamma val‐
391 ues greater than 1 make the output brighter; gamma values less
392 than 1 make it darker. The default value is 1.
393
394 screenBlackThreshold float
395 When halftoning, all values below this threshold are forced to
396 solid black. This parameter is a floating point value between 0
397 (black) and 1 (white). The default value is 0.
398
399 screenWhiteThreshold float
400 When halftoning, all values above this threshold are forced to
401 solid white. This parameter is a floating point value between 0
402 (black) and 1 (white). The default value is 1.
403
404 minLineWidth float
405 Set the minimum line width, in device pixels. This affects the
406 rasterizer only, not the PostScript converter (except when it
407 uses rasterization to handle transparency). The default value
408 is 0 (no minimum).
409
410 drawAnnotations yes | no
411 If set to "no", annotations will not be drawn or printed. The
412 default value is "yes".
413
414 overprintPreview yes | no
415 If set to "yes", generate overprint preview output, honoring the
416 OP/op/OPM settings in the PDF file. Ignored for non-CMYK out‐
417 put. The default value is "no".
418
419 launchCommand command
420 Sets the command executed when you click on a "launch"-type
421 link. The intent is for the command to be a program/script
422 which determines the file type and runs the appropriate viewer.
423 The command line will consist of the file to be launched, fol‐
424 lowed by any parameters specified with the link. Do not use
425 "%s" in "command". By default, this is unset, and Xpdf will
426 simply try to execute the file (after prompting the user).
427
428 urlCommand command
429 Sets the command executed when you click on a URL link. The
430 string "%s" will be replaced with the URL. (See the example
431 below.) This has no default value.
432
433 movieCommand command
434 Sets the command executed when you click on a movie annotation.
435 The string "%s" will be replaced with the movie file name. This
436 has no default value.
437
438 mapNumericCharNames yes | no
439 If set to "yes", the Xpdf tools will attempt to map various
440 numeric character names sometimes used in font subsets. In some
441 cases this leads to usable text, and in other cases it leads to
442 gibberish -- there is no way for Xpdf to tell. This defaults to
443 "yes".
444
445 mapUnknownCharNames yes | no
446 If set to "yes", and mapNumericCharNames is set to "no", the
447 Xpdf tools will apply a simple pass-through mapping (Unicode
448 index = character code) for all unrecognized glyph names. (For
449 CID fonts, setting mapNumericCharNames to "no" is unnecessary.)
450 In some cases, this leads to usable text, and in other cases it
451 leads to gibberish -- there is no way for Xpdf to tell. This
452 defaults to "no".
453
454 bind modifiers-key context command ...
455 Add a key or mouse button binding. Modifiers can be zero or
456 more of:
457
458 shift-
459 ctrl-
460 alt-
461
462 Key can be a regular ASCII character, or any one of:
463
464 space
465 tab
466 return
467 enter
468 backspace
469 insert
470 delete
471 home
472 end
473 pgup
474 pgdn
475 left / right / up / down (arrow keys)
476 f1 .. f35 (function keys)
477 mousePress1 .. mousePress7 (mouse buttons)
478 mouseRelease1 .. mouseRelease7 (mouse buttons)
479
480 Context is either "any" or a comma-separated combination of:
481
482 fullScreen / window (full screen mode on/off)
483 continuous / singlePage (continuous mode on/off)
484 overLink / offLink (mouse over link or not)
485 scrLockOn / scrLockOff (scroll lock on/off)
486
487 The context string can include only one of each pair in the
488 above list.
489
490 Command is an Xpdf command (see the COMMANDS section of the
491 xpdf(1) man page for details). Multiple commands are separated
492 by whitespace.
493
494 The bind command replaces any existing binding, but only if it
495 was defined for the exact same modifiers, key, and context. All
496 tokens (modifiers, key, context, commands) are case-sensitive.
497
498 Example key bindings:
499
500 # bind ctrl-a in any context to the nextPage
501 # command
502 bind ctrl-a any nextPage
503
504 # bind uppercase B, when in continuous mode
505 # with scroll lock on, to the reload command
506 # followed by the prevPage command
507 bind B continuous,scrLockOn reload prevPage
508
509 See the xpdf(1) man page for more examples.
510
511 unbind modifiers-key context
512 Removes a key binding established with the bind command. This
513 is most useful to remove default key bindings before establish‐
514 ing new ones (e.g., if the default key binding is given for
515 "any" context, and you want to create new key bindings for mul‐
516 tiple contexts).
517
518 printCommands yes | no
519 If set to "yes", drawing commands are printed as they're exe‐
520 cuted (useful for debugging). This defaults to "no".
521
522 errQuiet yes | no
523 If set to "yes", this suppresses all error and warning messages
524 from all of the Xpdf tools. This defaults to "no".
525
527 The following is a sample xpdfrc file.
528
529 # from the Thai support package
530 nameToUnicode /usr/local/share/xpdf/Thai.nameToUnicode
531
532 # from the Japanese support package
533 cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/Adobe-Japan1.cidToUnicode
534 unicodeMap JISX0208 /usr/local/share/xpdf/JISX0208.unicodeMap
535 cMapDir Adobe-Japan1 /usr/local/share/xpdf/cmap/Adobe-Japan1
536
537 # use the Base-14 Type 1 fonts from ghostscript
538 fontFile Times-Roman /usr/local/share/ghostscript/fonts/n021003l.pfb
539 fontFile Times-Italic /usr/local/share/ghostscript/fonts/n021023l.pfb
540 fontFile Times-Bold /usr/local/share/ghostscript/fonts/n021004l.pfb
541 fontFile Times-BoldItalic /usr/local/share/ghostscript/fonts/n021024l.pfb
542 fontFile Helvetica /usr/local/share/ghostscript/fonts/n019003l.pfb
543 fontFile Helvetica-Oblique /usr/local/share/ghostscript/fonts/n019023l.pfb
544 fontFile Helvetica-Bold /usr/local/share/ghostscript/fonts/n019004l.pfb
545 fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
546 fontFile Courier /usr/local/share/ghostscript/fonts/n022003l.pfb
547 fontFile Courier-Oblique /usr/local/share/ghostscript/fonts/n022023l.pfb
548 fontFile Courier-Bold /usr/local/share/ghostscript/fonts/n022004l.pfb
549 fontFile Courier-BoldOblique /usr/local/share/ghostscript/fonts/n022024l.pfb
550 fontFile Symbol /usr/local/share/ghostscript/fonts/s050000l.pfb
551 fontFile ZapfDingbats /usr/local/share/ghostscript/fonts/d050000l.pfb
552
553 # use the Bakoma Type 1 fonts
554 # (this assumes they happen to be installed in /usr/local/fonts/bakoma)
555 fontDir /usr/local/fonts/bakoma
556
557 # set some PostScript options
558 psPaperSize letter
559 psDuplex no
560 psLevel level2
561 psEmbedType1Fonts yes
562 psEmbedTrueTypeFonts yes
563 psFile "| lpr -Pprinter5"
564
565 # assume that the PostScript printer has the Univers and
566 # Univers-Bold fonts
567 psResidentFont Univers Univers
568 psResidentFont Univers-Bold Univers-Bold
569
570 # set the text output options
571 textEncoding UTF-8
572 textEOL unix
573
574 # misc options
575 enableT1lib yes
576 enableFreeType yes
577 launchCommand viewer-script
578 urlCommand "netscape -remote 'openURL(%s)'"
579
580
582 /etc/xpdfrc
583 This is the default location for the system-wide configuration
584 file. Depending on build options, it may be placed elsewhere.
585
586 $HOME/.xpdfrc
587 This is the user's configuration file. If it exists, it will be
588 read in place of the system-wide file.
589
591 The Xpdf software and documentation are copyright 1996-2011 Glyph &
592 Cog, LLC.
593
595 xpdf(1), pdftops(1), pdftotext(1), pdfinfo(1), pdffonts(1), pdfde‐
596 tach(1), pdftoppm(1), pdfimages(1)
597 http://www.foolabs.com/xpdf/
598
599
600
601 15 August 2011 xpdfrc(5)