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").
- include
config-file
- 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.
- fontFile
PDF-font-name font-file
- 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.
- psPaperSize
width(pts) height(pts)
- Sets the paper size for PostScript output. The width and
height parameters give the paper size in PostScript points (1 point
= 1/72 inch).
- psPaperSize
letter | legal | A4 | A3 | match
- 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.
- psImageableArea
llx lly urx ury
- 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.
- psCrop yes |
no
- 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".
- psExpandSmaller
yes | no
- 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".
- psShrinkLarger
yes | 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".
- psDuplex yes |
no
- 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".
- psLevel level1 |
level1sep | level2 | level2sep | level3 | level3Sep
- Sets the PostScript level to generate. This defaults to
"level2".
- psFile
file-or-command
- 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.
- textEncoding
encoding-name
- 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".
- initialZoom
percentage | page | width | height
- 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.
- continuousView
yes | no
- 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".
- overprintPreview
yes | 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".
- launchCommand
command
- 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).
- urlCommand
command
- 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.
- movieCommand
command
- 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.
- bind modifiers-key
context command ...
- 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.
- unbind
modifiers-key context
- 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).
- printCommands
yes | no
- If set to "yes", drawing commands are printed as they're
executed (useful for debugging). This defaults to "no".
- errQuiet yes
| no
- If set to "yes", this suppresses all error and warning messages
from all of the Xpdf tools. This defaults to "no".
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.