Debian Codegraph @

libs/xpdf/xpdf-src/doc/xpdfrc.5

raw
1 .\" Copyright 2002-2025 Glyph & Cog, LLC
2 .TH xpdfrc 5 "14 Nov 2025"
3 .SH NAME
4 xpdfrc \- configuration file for Xpdf tools (version 4.06)
5 .SH DESCRIPTION
6 All of the Xpdf tools read a single configuration file.
7 .PP
8 On Linux/Unix/MacOS: if you have a
9 .I .xpdfrc
10 file in your home directory, it will be read. Otherwise, a
11 system-wide configuration file will be read from
12 .IR /etc/xpdfrc ,
13 if it exists. (This is its default location; depending on build
14 options, it may be placed elsewhere.)
15 .PP
16 On Windows: the file must be named
17 .I xpdfrc
18 (no leading dot, no extension), and must be placed in the same
19 directory as the executable (pdftotext.exe, xpdf.exe, etc.)
20 .PP
21 The xpdfrc file consists of a series of configuration options, one
22 per line. Blank lines and lines starting with a \'#' (comments) are
23 ignored.
24 .PP
25 Arguments can be single-quoted or double-quoted, e.g., for file names
26 that contain spaces ("aaa bbb", 'aaa bbb'). This quoting does not
27 provide any escaping, so there's no way to include a double quote in a
28 double-quoted argument or a single quote in a single-quoted argument.
29 .PP
30
31 Arguments can also be at-quoted: @"aaa bbb". At-quoted strings allow
32 use of the DATADIR variable, which is set to the 'data' subdirectory
33 in the xpdf install directory. The percent sign (%) is an escape
34 character: a percent sign followed by any other character is replaced
35 with that character.
36 .PP
37 .RS
38 .nf
39 @"abc %"def%" ghi" --> abc "def" ghi
40 @"${DATADIR}/foo" --> ...install-dir.../data/foo
41 @"%${DATADIR}/foo" --> ${DATADIR}/foo
42 .fi
43 .RE
44 .PP
45 The following sections list all of the configuration options, sorted
46 into functional groups. There is an examples section at the end.
47 .SH INCLUDE FILES
48 .TP
49 .BI include " config\-file"
50 Includes the specified config file. The effect of this is equivalent
51 to inserting the contents of
52 .I config\-file
53 directly into the parent config file in place of the
54 .I include
55 command. Config files can be nested arbitrarily deeply.
56 .SH GENERAL FONT CONFIGURATION
57 .TP
58 .BI fontFile " PDF\-font\-name font\-file"
59 Maps a PDF font,
60 .IR PDF\-font\-name ,
61 to a font for display or PostScript output. The font file,
62 .IR font\-file ,
63 can be any type allowed in a PDF file. This command can be used for
64 8-bit or 16-bit (CID) fonts.
65 .TP
66 .BI fontDir " dir"
67 Specifies a search directory for font files. There can be multiple
68 fontDir commands; all of the specified directories will be searched in
69 order. The font files can be Type 1 (.pfa or .pfb) or TrueType (.ttf
70 or .ttc); other files in the directory will be ignored. The font file
71 name (not including the extension) must exactly match the PDF font
72 name. This search is performed if the font name doesn't match any of
73 the fonts declared with the fontFile command. There are no default
74 fontDir directories.
75 .TP
76 .BI fontFileCC " registry\-ordering font\-file"
77 Maps the
78 .I registry\-ordering
79 character collection to a font for display or PostScript output. This
80 mapping is used if the font name doesn't match any of the fonts
81 declared with the fontFile, fontDir, psResidentFont16, or
82 psResidentFontCC commands.
83 .SH POSTSCRIPT FONT CONFIGURATION
84 .TP
85 .BR psFontPassthrough " yes | no"
86 If set to "yes", pass 8-bit font names through to the PostScript
87 output without substitution. Fonts which are not embedded in the PDF
88 file are expected to be available on the printer. This defaults to
89 "no".
90 .TP
91 .BI psResidentFont " PDF\-font\-name PS\-font\-name"
92 When the 8-bit font
93 .I PDF\-font\-name
94 is used (without embedding) in a PDF file, it will be translated to
95 the PostScript font
96 .IR PS\-font\-name ,
97 which is assumed to be resident in the printer. Typically,
98 .I PDF\-font\-name
99 and
100 .I PS\-font\-name
101 are the same. By default, only the Base-14 fonts are assumed to be
102 resident.
103 .TP
104 .BI psResidentFont16 " PDF\-font\-name wMode PS\-font\-name encoding"
105 When the 16-bit (CID) font
106 .I PDF\-font\-name
107 with writing mode
108 .I wMode
109 is used (without embedding) in a PDF file, it will be translated to
110 the PostScript font
111 .IR PS\-font\-name ,
112 which is assumed to be resident in the printer. The writing mode
113 must be either \'H' for horizontal or \'V' for vertical. The resident
114 font is assumed to use the specified encoding (which must have been
115 defined with the unicodeMap command).
116 .TP
117 .BI psResidentFontCC " registry\-ordering wMode PS\-font\-name encoding"
118 When a 16-bit (CID) font using the
119 .I registry\-ordering
120 character collection and
121 .I wMode
122 writing mode is used (without embedding) in a PDF file, the PostScript
123 font,
124 .IR PS\-font\-name ,
125 is substituted for it. The substituted font is assumed to be
126 resident in the printer. The writing mode must be either \'H' for
127 horizontal or \'V' for vertical. The resident font is assumed to use
128 the specified encoding (which must have been defined with the
129 unicodeMap command).
130 .TP
131 .BR psEmbedType1Fonts " yes | no"
132 If set to "no", prevents embedding of Type 1 fonts in generated
133 PostScript. This defaults to "yes".
134 .TP
135 .BR psEmbedTrueTypeFonts " yes | no"
136 If set to "no", prevents embedding of TrueType fonts in generated
137 PostScript. This defaults to "yes".
138 .TP
139 .BR psEmbedCIDTrueTypeFonts " yes | no"
140 If set to "no", prevents embedding of CID TrueType fonts in generated
141 PostScript. For Level 3 PostScript, this generates a CID font, for
142 lower levels it generates a non-CID composite font. This defaults to
143 "yes".
144 .TP
145 .BR psEmbedCIDPostScriptFonts " yes | no"
146 If set to "no", prevents embedding of CID PostScript fonts in
147 generated PostScript. For Level 3 PostScript, this generates a CID
148 font, for lower levels it generates a non-CID composite font. This
149 defaults to "yes".
150 .SH POSTSCRIPT CONTROL
151 .TP
152 .BI psPaperSize " width(pts) height(pts)"
153 Sets the paper size for PostScript output. The
154 .I width
155 and
156 .I height
157 parameters give the paper size in PostScript points (1 point = 1/72
158 inch).
159 .TP
160 .BR psPaperSize " letter | legal | A4 | A3 | match"
161 Sets the paper size for PostScript output to a standard size. The
162 default paper size is set when xpdf and pdftops are built, typically
163 to "letter" or "A4". This can also be set to "match", which will set
164 the paper size to match the size specified in the PDF file.
165 .TP
166 .BR psImageableArea " llx lly urx ury"
167 Sets the imageable area for PostScript output. The four integers are
168 the coordinates of the lower-left and upper-right corners of the
169 imageable region, specified in points (with the origin being the
170 lower-left corner of the paper). This defaults to the full paper
171 size; the psPaperSize option will reset the imageable area
172 coordinates.
173 .TP
174 .BR psCrop " yes | no"
175 If set to "yes", PostScript output is cropped to the CropBox specified
176 in the PDF file; otherwise no cropping is done. This defaults to
177 "yes".
178 .TP
179 .BR psUseCropBoxAsPage " yes | no"
180 If set to "yes", PostScript output treats the CropBox as the page size.
181 By default, this is "no", and the MediaBox is used as the page size.
182 .TP
183 .BR psExpandSmaller " yes | no"
184 If set to "yes", PDF pages smaller than the PostScript imageable area
185 are expanded to fill the imageable area. Otherwise, no scaling is
186 done on smaller pages. This defaults to "no".
187 .TP
188 .BR psShrinkLarger " yes | no"
189 If set to yes, PDF pages larger than the PostScript imageable area are
190 shrunk to fit the imageable area. Otherwise, no scaling is done on
191 larger pages. This defaults to "yes".
192 .TP
193 .BR psCenter " yes | no"
194 If set to yes, PDF pages smaller than the PostScript imageable area
195 (after any scaling) are centered in the imageable area. Otherwise,
196 they are aligned at the lower-left corner of the imageable area. This
197 defaults to "yes".
198 .TP
199 .BR psDuplex " yes | no"
200 If set to "yes", the generated PostScript will set the "Duplex"
201 pagedevice entry. This tells duplex-capable printers to enable
202 duplexing. This defaults to "no".
203 .TP
204 .BR psLevel " level1 | level1sep | level2 | level2gray | level2sep | level3 | level3gray | level3Sep"
205 Sets the PostScript level to generate. This defaults to "level2".
206 .TP
207 .BR psPreload " yes | no"
208 If set to "yes", PDF forms are converted to PS procedures, and image
209 data is preloaded. This uses more memory in the PostScript
210 interpreter, but generates significantly smaller PS files in
211 situations where, e.g., the same image is drawn on every page of a
212 long document. This defaults to "no".
213 .TP
214 .BR psOPI " yes | no"
215 If set to "yes", generates PostScript OPI comments for all images and
216 forms which have OPI information. This option is only available if
217 the Xpdf tools were compiled with OPI support. This defaults to "no".
218 .TP
219 .BR psASCIIHex " yes | no"
220 If set to "yes", the ASCIIHexEncode filter will be used instead of
221 ASCII85Encode for binary data. This defaults to "no".
222 .TP
223 .BR psLZW " yes | no"
224 If set to "yes", the LZWEncode filter will be used for lossless
225 compression in PostScript output; if set to "no", the RunLengthEncode
226 filter will be used instead. LZW generates better compression
227 (smaller PS files), but may not be supported by some printers. This
228 defaults to "yes".
229 .TP
230 .BR psUncompressPreloadedImages " yes | no"
231 If set to "yes", all preloaded images in PS files will uncompressed.
232 If set to "no", the original compressed images will be used when
233 possible. The "yes" setting is useful to work around certain buggy
234 PostScript interpreters. This defaults to "no".
235 .TP
236 .BR psMinLineWidth " float"
237 Set the minimum line width, in points, for PostScript output. The
238 default value is 0 (no minimum).
239 .TP
240 .BR psRasterResolution " float"
241 Set the resolution (in dpi) for rasterized pages in PostScript output.
242 (Pdftops will rasterize pages which use transparency.) This defaults
243 to 300.
244 .TP
245 .BR psRasterMono " yes | no"
246 If set to "yes", rasterized pages in PS files will be monochrome
247 (8-bit gray) instead of color. This defaults to "no".
248 .TP
249 .BR psRasterSliceSize " pixels"
250 When rasterizing pages, pdftops splits the page into horizontal
251 "slices", to limit memory usage. This option sets the maximum slice
252 size, in pixels. This defaults to 20000000 (20 million).
253 .TP
254 .BR psAlwaysRasterize " yes | no"
255 If set to "yes", all PostScript output will be rasterized. This
256 defaults to "no".
257 .TP
258 .BR psNeverRasterize " yes | no"
259 Pdftops rasterizes an pages that use transparency (because PostScript
260 doesn't support transparency). If psNeverRasterize is set to "yes",
261 rasterization is disabled: pages will never be rasterized, even if
262 they contain transparency. This will likely result in incorrect
263 output for PDF files that use transparency, and a warning message to
264 that effect will be printed. This defaults to "no".
265 .TP
266 .BI fontDir " dir"
267 See the description above, in the DISPLAY FONTS section.
268 .SH TEXT CONTROL AND CHARACTER MAPPING
269 .TP
270 .BI textEncoding " encoding\-name"
271 Sets the encoding to use for text output. (This can be overridden
272 with the "\-enc" switch on the command line.) The
273 .I encoding\-name
274 must be defined with the unicodeMap command (see above). This
275 defaults to "Latin1".
276 .TP
277 .BR textEOL " unix | dos | mac"
278 Sets the end-of-line convention to use for text output. The options
279 are:
280 .nf
281
282 unix = LF
283 dos = CR+LF
284 mac = CR
285
286 .fi
287 (This can be overridden with the "\-eol" switch on the command line.)
288 The default value is based on the OS where xpdf and pdftotext were
289 built.
290 .TP
291 .BR textPageBreaks " yes | no"
292 If set to "yes", text extraction will insert page breaks (form feed
293 characters) between pages. This defaults to "yes".
294 .TP
295 .BR textKeepTinyChars " yes | no"
296 If set to "yes", text extraction will keep all characters. If set to
297 "no", text extraction will discard tiny (smaller than 3 point)
298 characters after the first 50000 per page, avoiding extremely slow run
299 times for PDF files that use special fonts to do shading or
300 cross-hatching. This defaults to "yes".
301 .TP
302 .BI nameToUnicode " map\-file"
303 Specifies a file with the mapping from character names to Unicode.
304 This is used to handle PDF fonts that have valid encodings but no
305 ToUnicode entry. Each line of a nameToUnicode file looks like this:
306
307 .I " " hex\-string name
308
309 The
310 .I hex\-string
311 is the Unicode (UCS-2) character index, and
312 .I name
313 is the corresponding character name. Multiple nameToUnicode files can
314 be used; if a character name is given more than once, the code in the
315 last specified file is used. There is a built-in default
316 nameToUnicode table with all of Adobe's standard character names.
317 .TP
318 .BI cidToUnicode " registry\-ordering map\-file"
319 Specifies the file with the mapping from character collection to
320 Unicode. Each line of a cidToUnicode file represents one character:
321
322 .I " " hex\-string
323
324 The
325 .I hex\-string
326 is the Unicode (UCS-2) index for that character. The first line maps
327 CID 0, the second line CID 1, etc. File size is determined by size of
328 the character collection. Only one file is allowed per character
329 collection; the last specified file is used. There are no built-in
330 cidToUnicode mappings.
331 .TP
332 .BI unicodeToUnicode " font\-name\-substring map\-file"
333 This is used to work around PDF fonts which have incorrect Unicode
334 information. It specifies a file which maps from the given
335 (incorrect) Unicode indexes to the correct ones. The mapping will be
336 used for any font whose name contains
337 .IR font\-name\-substring .
338 Each line of a unicodeToUnicode file represents one Unicode character:
339
340 .RI " " in\-hex " " out\-hex1 " " out\-hex2 " ..."
341
342 The
343 .I in\-hex
344 field is an input (incorrect) Unicode index, and the rest of the
345 fields are one or more output (correct) Unicode indexes. Each
346 occurrence of
347 .I in\-hex
348 will be converted to the specified output sequence.
349 .TP
350 .BI unicodeRemapping " remap\-file"
351 Remap Unicode characters when doing text extraction. This specifies a
352 file that maps from a particular Unicode index to zero or more
353 replacement Unicode indexes. Each line of the remap file represents
354 one Unicode character:
355
356 .RI " " in\-hex " " out\-hex1 " " out\-hex2 " ..."
357
358 Any Unicode characters not listed will be left unchanged. This
359 function is typically used to remap things like non-breaking spaces,
360 soft hyphens, ligatures, etc.
361 .TP
362 .BI unicodeMap " encoding\-name map\-file"
363 Specifies the file with mapping from Unicode to
364 .IR encoding\-name .
365 These encodings are used for text output (see below). Each line of a
366 unicodeMap file represents a range of one or more Unicode characters
367 which maps linearly to a range in the output encoding:
368 .nf
369
370 .I " " in\-start\-hex in\-end\-hex out\-start\-hex
371
372 .fi
373 Entries for single characters can be abbreviated to:
374 .nf
375
376 .I " " in\-hex out\-hex
377
378 .fi
379 The
380 .I in\-start\-hex
381 and
382 .I in\-end\-hex
383 fields (or the single
384 .I in\-hex
385 field) specify the Unicode range. The
386 .I out\-start\-hex
387 field (or the
388 .I out\-hex
389 field) specifies the start of the output encoding range. The length
390 of the
391 .I out\-start\-hex
392 (or
393 .IR out\-hex )
394 string determines the length of the output characters (e.g., UTF-8
395 uses different numbers of bytes to represent characters in different
396 ranges). Entries must be given in increasing Unicode order. Only one
397 file is allowed per encoding; the last specified file is used. The
398 .IR Latin1 ,
399 .IR ASCII7 ,
400 .IR Symbol ,
401 .IR ZapfDingbats ,
402 .IR UTF-8 ,
403 and
404 .I UCS-2
405 encodings are predefined.
406 .TP
407 .BI cMapDir " registry\-ordering dir"
408 Specifies a search directory,
409 .IR dir ,
410 for CMaps for the
411 .I registry\-ordering
412 character collection. There can be multiple directories for a
413 particular collection. There are no default CMap directories.
414 .TP
415 .BI toUnicodeDir " dir"
416 Specifies a search directory,
417 .IR dir ,
418 for ToUnicode CMaps. There can be multiple ToUnicode directories.
419 There are no default ToUnicode directories.
420 .TP
421 .BI mapNumericCharNames " yes | no"
422 If set to "yes", the Xpdf tools will attempt to map various numeric
423 character names sometimes used in font subsets. In some cases this
424 leads to usable text, and in other cases it leads to gibberish --
425 there is no way for Xpdf to tell. This defaults to "yes".
426 .TP
427 .BI mapUnknownCharNames " yes | no"
428 If set to "yes", and mapNumericCharNames is set to "no", the Xpdf
429 tools will apply a simple pass-through mapping (Unicode index =
430 character code) for all unrecognized glyph names. (For CID fonts,
431 setting mapNumericCharNames to "no" is unnecessary.) In some cases,
432 this leads to usable text, and in other cases it leads to gibberish --
433 there is no way for Xpdf to tell. This defaults to "no".
434 .TP
435 .BI mapExtTrueTypeFontsViaUnicode " yes | no"
436 When rasterizing text using an external TrueType font, there are two
437 options for handling character codes. If
438 mapExtTrueTypeFontsViaUnicode is set to "yes", Xpdf will use the font
439 encoding/ToUnicode info to map character codes to Unicode, and then
440 use the font's Unicode cmap to map Unicode to GIDs. If
441 mapExtTrueTypeFontsViaUnicode is set to "no", Xpdf will assume the
442 character codes are GIDs (i.e., use an identity mapping). This
443 defaults to "yes".
444 .TP
445 .BI useTrueTypeUnicodeMapping " yes | no"
446 If set to "yes", the Xpdf tools will use the Unicode encoding
447 information in TrueType fonts (16-bit only), if avaiable, to override
448 the PDF ToUnicode maps. Otherwise, the ToUnicode maps are always used
449 when present. This defaults to "no".
450 .TP
451 .BI ignoreWrongSizeToUnicode " yes | no"
452 If set to "yes", Xpdf will ignore any ToUnicode CMaps that don't match
453 the font type (8-bit vs 16-bit). The PDF spec requires ToUnicode
454 CMaps match, and Adobe appears to ignore CMaps that don't match. This
455 defaults to "no" (for backward compatibility).
456 .TP
457 .BI dropFont " font-name"
458 Drop all text drawn in the specified font. To drop text drawn in
459 unnamed fonts, use:
460 .nf
461
462 dropFont ""
463
464 .fi
465 There can be any number of dropFont commands.
466 .TP
467 .BI separateRotatedText " yes | no"
468 If set to "no", pdftotext will attempt to place rotated text into the
469 "correct" location in the output. If set to "yes", when using reading
470 order mode, pdftotext will append rotated text to the end, after
471 unrotated text. This defaults to "no".
472 .TP
473 .BI discardCoveredText " yes | no"
474 If set to "yes", the xpdf tools will discard all text drawn before
475 ("under") a full-page fill. If set to "no", such text will be marked
476 as invisible (only relevant for pdftohtml), but not discarded. This
477 defaults to "no".
478 .SH RASTERIZER SETTINGS
479 .TP
480 .BR enableFreeType " yes | no"
481 Enables or disables use of FreeType (a TrueType / Type 1 font
482 rasterizer). This is only relevant if the Xpdf tools were built with
483 FreeType support. ("enableFreeType" replaces the old
484 "freetypeControl" option.) This option defaults to "yes".
485 .TP
486 .BR disableFreeTypeHinting " yes | no"
487 If this is set to "yes", FreeType hinting will be forced off. This
488 option defaults to "no".
489 .TP
490 .BR antialias " yes | no"
491 Enables or disables font anti-aliasing in the PDF rasterizer. This
492 option affects all font rasterizers. ("antialias" replaces the
493 anti-aliasing control provided by the old "t1libControl" and
494 "freetypeControl" options.) This default to "yes".
495 .TP
496 .BR vectorAntialias " yes | no"
497 Enables or disables anti-aliasing of vector graphics in the PDF
498 rasterizer. This defaults to "yes".
499 .TP
500 .BR imageMaskAntialias " yes | no"
501 Enables or disables anti-aliasing of image masks (when downsampling or
502 upsampling) in the PDF rasterizer. This defaults to "yes".
503 .TP
504 .BR antialiasPrinting " yes | no"
505 If this is "yes", bitmaps sent to the printer will be antialiased
506 (according to the "antialias" and "vectorAntialias" settings). If
507 this is "no", printed bitmaps will not be antialiased. This defaults
508 to "no".
509 .TP
510 .BR strokeAdjust " yes | no | cad"
511 Sets the stroke adjustment mode. If set to "no", no stroke adjustment
512 will be done. If set to "yes", normal stroke adjustment will be done:
513 horizontal and vertical lines will be moved by up to half a pixel to
514 make them look cleaner when vector anti-aliasing is enabled. If set
515 to "cad", a slightly different stroke adjustment algorithm will be
516 used to ensure that lines of the same original width will always have
517 the same adjusted width (at the expense of allowing gaps and overlaps
518 between adjacent lines). This defaults to "yes".
519 .TP
520 .BR forceAccurateTiling " yes | no"
521 If this is set to "yes", the TilingType is forced to 2 (no distortion)
522 for all tiling patterns, regardless of the setting in the pattern
523 dictionary. This defaults to "no".
524 .TP
525 .BR screenType " dispersed | clustered | stochasticClustered"
526 Sets the halftone screen type, which will be used when generating a
527 monochrome (1-bit) bitmap. The three options are dispersed-dot
528 dithering, clustered-dot dithering (with a round dot and 45-degree
529 screen angle), and stochastic clustered-dot dithering. By default,
530 "stochasticClustered" is used for resolutions of 300 dpi and higher,
531 and "dispersed" is used for resolutions lower then 300 dpi.
532 .TP
533 .BI screenSize " integer"
534 Sets the size of the (square) halftone screen threshold matrix. By
535 default, this is 4 for dispersed-dot dithering, 10 for clustered-dot
536 dithering, and 100 for stochastic clustered-dot dithering.
537 .TP
538 .BI screenDotRadius " integer"
539 Sets the halftone screen dot radius. This is only used when
540 screenType is set to stochasticClustered, and it defaults to 2. In
541 clustered-dot mode, the dot radius is half of the screen size.
542 Dispersed-dot dithering doesn't have a dot radius.
543 .TP
544 .BI screenGamma " float"
545 Sets the halftone screen gamma correction parameter. Gamma values
546 greater than 1 make the output brighter; gamma values less than 1 make
547 it darker. The default value is 1.
548 .TP
549 .BI screenBlackThreshold " float"
550 When halftoning, all values below this threshold are forced to solid
551 black. This parameter is a floating point value between 0 (black) and
552 1 (white). The default value is 0.
553 .TP
554 .BI screenWhiteThreshold " float"
555 When halftoning, all values above this threshold are forced to solid
556 white. This parameter is a floating point value between 0 (black) and
557 1 (white). The default value is 1.
558 .TP
559 .BI minLineWidth " float"
560 Set the minimum line width, in device pixels. This affects the
561 rasterizer only, not the PostScript converter (except when it uses
562 rasterization to handle transparency). The default value is 0 (no
563 minimum).
564 .TP
565 .BI enablePathSimplification " yes | no"
566 If set to "yes", simplify paths by removing points where it won't make
567 a significant difference to the shape. The default value is "no".
568 .TP
569 .BI overprintPreview " yes | no"
570 If set to "yes", generate overprint preview output, honoring the
571 OP/op/OPM settings in the PDF file. Ignored for non-CMYK output. The
572 default value is "no".
573 .SH VIEWER SETTINGS
574 These settings only apply to the Xpdf GUI PDF viewer.
575 .TP
576 .BR initialZoom " \fIpercentage\fR | page | width"
577 Sets the initial zoom factor. A number specifies a zoom percentage,
578 where 100 means 72 dpi. You may also specify \'page', to fit the page
579 to the window size, or \'width', to fit the page width to the window
580 width.
581 .TP
582 .BI defaultFitZoom " percentage"
583 If xpdf is started with fit-page or fit-width zoom and no window
584 geometry, it will calculate a desired window size based on the PDF
585 page size and this defaultFitZoom value. I.e., the window size will
586 be chosen such that exactly one page will fit in the window at this
587 zoom factor (which must be a percentage). The default value is
588 based on the screen resolution.
589 .TP
590 .BI zoomScaleFactor " \fIratio\fR | actual"
591 Zoom percentages will be scaled by this factor. By default, 100% zoom
592 corresponds to 72 dpi. Setting zoomScaleFactor to 1.5 will make 100%
593 zoom 1.5x larger, i.e., 108dpi. If this is set to \'actual', the zoom
594 scale factor will be computed based on the screen resolution. The
595 default value is 1.0.
596 .TP
597 .BI zoomValues " zoom1 zoom2 zoom3 ..."
598 Sets the list of zoom values (percentages) displayed in the zoom combo box.
599 The default list is: 25 50 75 100 110 125 150 175 200 300 400 600 800.
600 .TP
601 .BR initialDisplayMode " single | continuous | sideBySideSingle | sideBySideContinuous | horizontalContinuous"
602 Sets the initial display mode. The default setting is "continuous".
603 .TP
604 .BI initialToolbarState " yes | no"
605 If set to "yes", xpdf opens with the toolbar visible. If set to "no",
606 xpdf opens with the toolbar hidden. The default is "yes".
607 .TP
608 .BI initialSidebarState " yes | no"
609 If set to "yes", xpdf opens with the sidebar (tabs, outline, etc.)
610 visible. If set to "no", xpdf opens with the sidebar collapsed. The
611 default is "yes".
612 .TP
613 .BI initialSidebarWidth " width"
614 Sets the initial sidebar width, in pixels. This is only relevant if
615 initialSidebarState is "yes". The default value is zero, which tells
616 xpdf to use an internal default size.
617 .TP
618 .BR initialSelectMode " block | linear"
619 Sets the initial selection mode. The default setting is "linear".
620 .TP
621 .BI initialMaximized " yes | no"
622 If set to "yes", xpdf windows open maximized. The default is "no".
623 .TP
624 .BI paperColor " color"
625 Set the "paper color", i.e., the background of the page display. The
626 color can be #RRGGBB (hexadecimal) or a named color. This option will
627 not work well with PDF files that do things like filling in white
628 behind the text.
629 .TP
630 .BI matteColor " color"
631 Set the matte color, i.e., the color used for background outside the
632 actual page area. The color can be #RRGGBB (hexadecimal) or a named
633 color.
634 .TP
635 .BI fullScreenMatteColor " color"
636 Set the matte color for full-screen mode. The color can be #RRGGBB
637 (hexadecimal) or a named color.
638 .TP
639 .BI selectionColor " color"
640 Set the selection color. The color can be #RRGGBB (hexadecimal) or a
641 named color.
642 .TP
643 .BI reverseVideoInvertImages " yes | no"
644 If set to "no", xpdf's reverse-video mode inverts text and vector
645 graphic content, but not images. If set to "yes", xpdf inverts images
646 as well. The default is "no".
647 .TP
648 .BI popupMenuCmd " title command ..."
649 Add a command to the popup menu.
650 .I Title
651 is the text to be displayed in the menu.
652 .I Command
653 is an Xpdf command (see the COMMANDS section of the
654 .BR xpdf (1)
655 man page for details). Multiple commands are separated by whitespace.
656 .TP
657 .BI maxTileWidth " pixels"
658 Set the maximum width of tiles to be used by xpdf when rasterizing
659 pages. This defaults to 1500.
660 .TP
661 .BI maxTileHeight " pixels"
662 Set the maximum height of tiles to be used by xpdf when rasterizing
663 pages. This defaults to 1500.
664 .TP
665 .BI tileCacheSize " tiles"
666 Set the maximum number of tiles to be cached by xpdf when rasterizing
667 pages. This defaults to 10.
668 .TP
669 .BI workerThreads " numThreads"
670 Set the number of worker threads to be used by xpdf when rasterizing
671 pages. This defaults to 1.
672 .TP
673 .BI allowLinksToChangeZoom " yes | no"
674 PDF links, including outline items, can include a new zoom level. If
675 this setting is "yes", Xpdf changes the zoom when links are clicked;
676 if "no", Xpdf moves to the destination but does not change the zoom.
677 This defaults to "yes".
678 .TP
679 .BI launchCommand " command"
680 Sets the command executed when you click on a "launch"-type link. The
681 intent is for the command to be a program/script which determines the
682 file type and runs the appropriate viewer. The command line will
683 consist of the file to be launched, followed by any parameters
684 specified with the link. Do not use "%s" in "command". By default,
685 this is unset, and Xpdf will simply try to execute the file (after
686 prompting the user).
687 .TP
688 .BI movieCommand " command"
689 Sets the command executed when you click on a movie annotation. The
690 string "%s" will be replaced with the movie file name. This has no
691 default value.
692 .TP
693 .BI defaultPrinter " printer"
694 Sets the default printer used in the viewer's print dialog.
695 .TP
696 .BI bind " modifiers-key context command ..."
697 Add a key or mouse button binding.
698 .I Modifiers
699 can be zero or more of:
700 .nf
701
702 shift-
703 ctrl-
704 alt-
705
706 .fi
707 .I Key
708 can be a regular ASCII character, or any one of:
709 .nf
710
711 space
712 tab
713 return
714 enter
715 backspace
716 esc
717 insert
718 delete
719 home
720 end
721 pgup
722 pgdn
723 left / right / up / down (arrow keys)
724 f1 .. f35 (function keys)
725 mousePress1 .. mousePress7 (mouse buttons)
726 mouseRelease1 .. mouseRelease7 (mouse buttons)
727 mouseClick1 .. mouseClick7 (mouse buttons)
728 mouseDoubleClick1 .. mouseDoubleClick7 (mouse buttons)
729 mouseTripleClick1 .. mouseTripleClick7 (mouse buttons)
730
731 .fi
732 .I Context
733 is either "any" or a comma-separated combination of:
734 .nf
735
736 fullScreen / window (full screen mode on/off)
737 continuous / singlePage (continuous mode on/off)
738 overLink / offLink (mouse over link or not)
739 scrLockOn / scrLockOff (scroll lock on/off)
740
741 .fi
742 The context string can include only one of each pair in the above
743 list.
744
745 .I Command
746 is an Xpdf command (see the COMMANDS section of the
747 .BR xpdf (1)
748 man page for details). Multiple commands are separated by whitespace.
749
750 The bind command replaces any existing binding, but only if it was
751 defined for the exact same modifiers, key, and context. All tokens
752 (modifiers, key, context, commands) are case-sensitive.
753
754 Example key bindings:
755 .nf
756
757 # bind ctrl-a in any context to the nextPage
758 # command
759 bind ctrl-a any nextPage
760
761 # bind uppercase B, when in continuous mode
762 # with scroll lock on, to the reload command
763 # followed by the prevPage command
764 bind B continuous,scrLockOn reload prevPage
765
766 .fi
767 See the
768 .BR xpdf (1)
769 man page for more examples.
770 .TP
771 .BI unbind " modifiers-key context"
772 Removes a key binding established with the bind command. This is most
773 useful to remove default key bindings before establishing new ones
774 (e.g., if the default key binding is given for "any" context, and you
775 want to create new key bindings for multiple contexts).
776 .TP
777 .BI tabStateFile " path"
778 Sets the file used by the loadTabState and saveTabState commands (see
779 the
780 .BR xpdf (1)
781 man page for more information). The default path is ~/.xpdf.tabstate.
782 .TP
783 .BI sessionFile " path"
784 Sets the file used by the saveSession and loadSession commands (see
785 the
786 .BR xpdf (1)
787 man page for more information). The default path is ~/.xpdf.session.
788 When xpdf automatically saves the session via a session manager, it
789 appends ".managed" to the path.
790 .TP
791 .BI saveSessionOnQuit " yes | no"
792 If set to "yes", xpdf will automatically save the current session
793 (equivalent to the saveSession command) when quitting (via the menu or
794 a key binding). The default value is "yes".
795 .SH MISCELLANEOUS SETTINGS
796 .TP
797 .BI drawAnnotations " yes | no"
798 If set to "no", annotations will not be drawn or printed. The default
799 value is "yes".
800 .TP
801 .BI drawFormFields " yes | no"
802 If set to "no", form fields will not be drawn or printed. The default
803 value is "yes".
804 .TP
805 .BI enableXFA " yes | no"
806 If an XFA form is present, and this option is set to "yes", Xpdf will
807 parse the XFA form and use certain XFA information to override
808 AcroForm information. If set to "no", the XFA form will not be read.
809 The default value is "yes".
810 .TP
811 .BI preferXFAFieldValues " yes | no"
812 If set to "yes", Xpdf will use the XFA field value if present, and
813 fall back to the AcroForm value otherwise. If set to "no", Xpdf will
814 use the AcroForm value, and completely ignore the XFA value. The
815 default value is "yes".
816 .TP
817 .BI savePageNumbers " yes | no"
818 If set to "yes", xpdf will save the current page numbers of all open
819 files in ~/.xpdf.pages when the files are closed (or when quitting
820 xpdf). Next time the file is opened, the last-viewed page number will
821 be restored. The default value is "yes".
822 .TP
823 .BI printCommands " yes | no"
824 If set to "yes", drawing commands are printed as they're executed
825 (useful for debugging). This defaults to "no".
826 .TP
827 .BI printStatusInfo
828 If set to "yes", print a status message (to stdout) before each page
829 is processed. This defaults to "no".
830 .TP
831 .BI errQuiet " yes | no"
832 If set to "yes", this suppresses all error and warning messages from
833 all of the Xpdf tools. This defaults to "no".
834 .SH EXAMPLES
835 The following is a sample xpdfrc file.
836 .nf
837
838 # from the Thai support package
839 nameToUnicode /usr/local/share/xpdf/Thai.nameToUnicode
840
841 # from the Japanese support package
842 cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/Adobe-Japan1.cidToUnicode
843 unicodeMap JISX0208 /usr/local/share/xpdf/JISX0208.unicodeMap
844 cMapDir Adobe-Japan1 /usr/local/share/xpdf/cmap/Adobe-Japan1
845
846 # use the Base-14 Type 1 fonts from ghostscript
847 fontFile Times-Roman /usr/local/share/ghostscript/fonts/n021003l.pfb
848 fontFile Times-Italic /usr/local/share/ghostscript/fonts/n021023l.pfb
849 fontFile Times-Bold /usr/local/share/ghostscript/fonts/n021004l.pfb
850 fontFile Times-BoldItalic /usr/local/share/ghostscript/fonts/n021024l.pfb
851 fontFile Helvetica /usr/local/share/ghostscript/fonts/n019003l.pfb
852 fontFile Helvetica-Oblique /usr/local/share/ghostscript/fonts/n019023l.pfb
853 fontFile Helvetica-Bold /usr/local/share/ghostscript/fonts/n019004l.pfb
854 fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
855 fontFile Courier /usr/local/share/ghostscript/fonts/n022003l.pfb
856 fontFile Courier-Oblique /usr/local/share/ghostscript/fonts/n022023l.pfb
857 fontFile Courier-Bold /usr/local/share/ghostscript/fonts/n022004l.pfb
858 fontFile Courier-BoldOblique /usr/local/share/ghostscript/fonts/n022024l.pfb
859 fontFile Symbol /usr/local/share/ghostscript/fonts/s050000l.pfb
860 fontFile ZapfDingbats /usr/local/share/ghostscript/fonts/d050000l.pfb
861
862 # use the Bakoma Type 1 fonts
863 # (this assumes they happen to be installed in /usr/local/fonts/bakoma)
864 fontDir /usr/local/fonts/bakoma
865
866 # set some PostScript options
867 psPaperSize letter
868 psDuplex no
869 psLevel level2
870 psEmbedType1Fonts yes
871 psEmbedTrueTypeFonts yes
872
873 # assume that the PostScript printer has the Univers and
874 # Univers-Bold fonts
875 psResidentFont Univers Univers
876 psResidentFont Univers-Bold Univers-Bold
877
878 # set the text output options
879 textEncoding UTF-8
880 textEOL unix
881
882 # misc options
883 enableFreeType yes
884 launchCommand viewer-script
885
886 .fi
887 .SH FILES
888 .TP
889 .B /etc/xpdfrc
890 This is the default location for the system-wide configuration file.
891 Depending on build options, it may be placed elsewhere.
892 .TP
893 .B $HOME/.xpdfrc
894 This is the user's configuration file. If it exists, it will be read
895 in place of the system-wide file.
896 .SH AUTHOR
897 The Xpdf software and documentation are copyright 1996-2025 Glyph &
898 Cog, LLC.
899 .SH "SEE ALSO"
900 .BR xpdf (1),
901 .BR pdftops (1),
902 .BR pdftotext (1),
903 .BR pdftohtml (1),
904 .BR pdfinfo (1),
905 .BR pdffonts (1),
906 .BR pdfdetach (1),
907 .BR pdftoppm (1),
908 .BR pdftopng (1),
909 .BR pdfimages (1)
910 .br
911 .B http://www.xpdfreader.com/