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