DOKK / manpages / debian 12 / xpdf / xpdfrc.5.en
xpdfrc(5) File Formats Manual xpdfrc(5)

xpdfrc - configuration file for xpdf (xpopple)

The xpdf program reads a single configuration file. If you have a .xpdfrc file in your home directory, it will be read. Otherwise, a system-wide configuration file will be read from /etc/xpdf/xpdfrc, if it exists. (This is its default location; depending on build options, it may be placed elsewhere.)

The xpdfrc file consists of a series of configuration options, one per line. Blank lines and lines starting with a '#' (comments) are ignored.

Arguments may be quoted, using "double-quote" characters, e.g., for file names that contain spaces.

The following sections list all of the configuration options, sorted into functional groups. There is an examples section at the end.

Note that all settings are case-sensitive; in particular, boolean options are "yes" and "no" (rather than "Yes" or "No").

Includes the specified config file. The effect of this is equivalent to inserting the contents of config-file directly into the parent config file in place of the include command. Config files can be nested arbitrarily deeply.

Maps a PDF font, PDF-font-name, to a font for display or PostScript output. The font file, font-file, can be any type allowed in a PDF file. This command can be used for 8-bit or 16-bit (CID) fonts.

Sets the paper size for PostScript output. The width and height parameters give the paper size in PostScript points (1 point = 1/72 inch).
Sets the paper size for PostScript output to a standard size. The default paper size is set when xpdf and pdftops are built, typically to "letter" or "A4". This can also be set to "match", which will set the paper size to match the size specified in the PDF file.
Sets the imageable area for PostScript output. The four integers are the coordinates of the lower-left and upper-right corners of the imageable region, specified in points (with the origin being the lower-left corner of the paper). This defaults to the full paper size; the psPaperSize option will reset the imageable area coordinates.
If set to "yes", PostScript output is cropped to the CropBox specified in the PDF file; otherwise no cropping is done. This defaults to "yes".
If set to "yes", PDF pages smaller than the PostScript imageable area are expanded to fill the imageable area. Otherwise, no scalling is done on smaller pages. This defaults to "no".
If set to yes, PDF pages larger than the PostScript imageable area are shrunk to fit the imageable area. Otherwise, no scaling is done on larger pages. This defaults to "yes".
If set to "yes", the generated PostScript will set the "Duplex" pagedevice entry. This tells duplex-capable printers to enable duplexing. This defaults to "no".
Sets the PostScript level to generate. This defaults to "level2".
Sets the default PostScript file or print command for xpdf. Commands start with a '|' character; anything else is a file. If the file name or command contains spaces it must be quoted. This defaults to unset, which tells xpdf to generate a name of the form <file>.ps for a PDF file <file>.pdf.

Sets the encoding to use for text output. (This can be overridden with the "-enc" switch on the command line.) The encoding-name must be defined with the unicodeMap command (see above). This defaults to "Latin1".

Sets the initial zoom factor. A number specifies a zoom percentage, where 100 means 72 dpi. You may also specify 'page', to fit the page to the window size, 'width', to fit the page width to the window width, or 'height', to fit the page height to the window height.
If set to "yes", xpdf will start in continuous view mode, i.e., with one vertical screoll bar for the whole document. This defaults to "no".
If set to "yes", generate overprint preview output, honoring the OP/op/OPM settings in the PDF file. Ignored for non-CMYK output. The default value is "no".
Sets the command executed when you click on a "launch"-type link. The intent is for the command to be a program/script which determines the file type and runs the appropriate viewer. The command line will consist of the file to be launched, followed by any parameters specified with the link. Do not use "%s" in "command". By default, this is unset, and Xpdf will simply try to execute the file (after prompting the user).
Sets the command executed when you click on a URL link. The string "%s" will be replaced with the URL. (See the example below.) This has no default value.
Sets the command executed when you click on a movie annotation. The string "%s" will be replaced with the movie file name. This has no default value.
Add a key or mouse button binding. Modifiers can be zero or more of:

shift-
ctrl-
alt-
Key can be a regular ASCII character, or any one of:

space
tab
return
enter
backspace
insert
delete
home
end
pgup
pgdn
left / right / up / down (arrow keys)
f1 .. f35 (function keys)
mousePress1 .. mousePress7 (mouse buttons)
mouseRelease1 .. mouseRelease7 (mouse buttons)
Context is either "any" or a comma-separated combination of:

fullScreen / window (full screen mode on/off)
continuous / singlePage (continuous mode on/off)
overLink / offLink (mouse over link or not)
scrLockOn / scrLockOff (scroll lock on/off)
The context string can include only one of each pair in the above list.

Command is an Xpdf command (see the COMMANDS section of the xpdf(1) man page for details). Multiple commands are separated by whitespace.

The bind command replaces any existing binding, but only if it was defined for the exact same modifiers, key, and context. All tokens (modifiers, key, context, commands) are case-sensitive.

Example key bindings:


# bind ctrl-a in any context to the nextPage
# command
bind ctrl-a any nextPage
# bind uppercase B, when in continuous mode
# with scroll lock on, to the reload command
# followed by the prevPage command
bind B continuous,scrLockOn reload prevPage
See the xpdf(1) man page for more examples.
Removes a key binding established with the bind command. This is most useful to remove default key bindings before establishing new ones (e.g., if the default key binding is given for "any" context, and you want to create new key bindings for multiple contexts).
If set to "yes", drawing commands are printed as they're executed (useful for debugging). This defaults to "no".
If set to "yes", this suppresses all error and warning messages from all of the Xpdf tools. This defaults to "no".

The following options were accepted by earlier versions of Xpdf but are no longer allowed. In most cases, this is because they control rendering options that Poppler does not support, or they were only used by tools other than Xpdf itself.

Obsolete. Controlled the use of font anti-aliasing in the PDF rasterizer.
Obsolete. Controlled the use of font anti-aliasing when printing.
Obsolete. Specified a file with the mapping from character collection to Unicode.
Obsolete. Specified a search directory for CMaps for a character collection.
Obsolete. Forced FreeType hinting to be disabled.
Obsolete. Mapped a character collection to an X font for display.
Obsolete. Mapped a PDF font to an X font for display.
Obsolete. Mapped a PDF CID font to an X font for display.
Obsolete. Controlled whether annotations would be drawn or printed.
Obsolete. Controlled whether FreeType was used for font rasterization.
Obsolete. Controlled whether t1lib was used for font rasterization.
Obsolete. Controlled whether XFA forms were rendered in place of AcroForms.
Obsolete. Specified a search directory for font files.
Obsolete. Mapped a character collection to a font.
Obsolete. From the configuration file format used before Xpdf 1.0.
Obsolete. From the configuration file format used before Xpdf 1.0.
Obsolete. Set the type of font rendering for FreeType to use.
Obsolete. Controlled how character codes were mapped when using external TrueType fonts.
Obsolete. Controlled how numeric character names in font subsets were mapped.
Obsolete. Controlled how unrecognized glyph names were mapped.
Obsolete. Set the minimum line width during rasterization.
Obsolete. Specified a file with the mapping from character names to Unicode.
Obsolete. Controlled whether the ASCIIHexEncode filter was be used for binary data in PostScript output.
Obsolete. Controlled whether all PostScript output would be rasterized.
Obsolete. Controlled whether small PDF pages were centered in PostScript output.
Obsolete. Prevented embedding of CID PostScript fonts in PostScript output.
Obsolete. Prevented embedding of CID TrueType fonts in PostScript output.
Obsolete. Prevented embedding of TrueType fonts in PostScript output.
Obsolete. Prevented embedding of Type 1 fonts in PostScript output.
Obsolete. Caused 8-bit font names to be passed through to the PostScript output without substitution.
Obsolete. Controlled whether the LZWEncode filter was used for lossless compression in PostScript output.
Obsolete. Set the minimum line width for PostScript output.
Obsolete. Generated PostScript OPI comments for all images and forms which have OPI information.
Obsolete. Controlled whether forms and images were preloaded in PostScript output.
Obsolete. Made rasterized pages in PS files monochrome instead of color.
Obsolete. Set the resolution for rasterized pages in PostScript output.
Obsolete. Set the maximum slice size used in rasterized PostScript output.
Obsolete. Indicated additional printer-resident PostScript fonts.
Obsolete. Indicated additional printer-resident PostScript fonts.
Obsolete. Indicated additional printer-resident PostScript fonts.
Obsolete. Made all preloaded images in PostScript files uncompressed.
Obsolete. Controlled whether PostScript output treats the CropBox as the page size.
Obsolete. Set the black threshold for halftoning.
Obsolete. Set the halftone screen dot radius.
Obsolete. Set the halftone screen gamma correction parameter.
Obsolete. Set the size of the halftone screen threshold matrix.
Obsolete. Set the halftone screen type when generating 1-bit bitmaps.
Obsolete. Set the white threshold for halftoning.
Obsolete. Controlled the use of stroke adjustment during antialiasing.
Obsolete. Set the type of font rendering for t1lib to use.
Obsolete. Set the end-of-line convention to use for text output.
Obsolete. Controlled whether very small characters were discarded in text output.
Obsolete. Controlled whether page breaks were represented as form feed characters in text output.
Obsolete. Specified a search directory for ToUnicode CMaps.
Obsolete. Specified a mapping file from Unicode to a text output encoding.
Obsolete. Specified a mapping file to work around PDF fonts which have incorrect Unicode information.
Obsolete. Controlled anti-aliasing of vector graphics during rasterization.

The following is a sample xpdfrc file.

# use the Base-14 Type 1 fonts from ghostscript
fontFile Times-Roman           /usr/local/share/ghostscript/fonts/n021003l.pfb
fontFile Times-Italic          /usr/local/share/ghostscript/fonts/n021023l.pfb
fontFile Times-Bold            /usr/local/share/ghostscript/fonts/n021004l.pfb
fontFile Times-BoldItalic      /usr/local/share/ghostscript/fonts/n021024l.pfb
fontFile Helvetica             /usr/local/share/ghostscript/fonts/n019003l.pfb
fontFile Helvetica-Oblique     /usr/local/share/ghostscript/fonts/n019023l.pfb
fontFile Helvetica-Bold        /usr/local/share/ghostscript/fonts/n019004l.pfb
fontFile Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
fontFile Courier               /usr/local/share/ghostscript/fonts/n022003l.pfb
fontFile Courier-Oblique       /usr/local/share/ghostscript/fonts/n022023l.pfb
fontFile Courier-Bold          /usr/local/share/ghostscript/fonts/n022004l.pfb
fontFile Courier-BoldOblique   /usr/local/share/ghostscript/fonts/n022024l.pfb
fontFile Symbol                /usr/local/share/ghostscript/fonts/s050000l.pfb
fontFile ZapfDingbats          /usr/local/share/ghostscript/fonts/d050000l.pfb
# set some PostScript options
psPaperSize          letter
psDuplex             no
psLevel              level2
psFile               "| lpr -Pprinter5"
# set the text output options
textEncoding UTF-8
# misc options
launchCommand   viewer-script
urlCommand      "netscape -remote 'openURL(%s)'"

/etc/xpdf/xpdfrc
This is the default location for the system-wide configuration file. Depending on build options, it may be placed elsewhere.
$HOME/.xpdfrc
This is the user's configuration file. If it exists, it will be read in place of the system-wide file.

The original Xpdf software and documentation are copyright 1996–2014 Glyph & Cog, LLC. Modifications for Poppler support and further development were done by the Debian and Gentoo Xpdf maintainers, and by xpopple contributors.

xpdf(1), pdftops(1), pdftotext(1), pdftohtml(1), pdfinfo(1), pdffonts(1), pdfdetach(1), pdftoppm(1), pdftopng(1), pdfimages(1)

24 Dec 2020