All of the Xpdf tools read 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 /usr/local/etc/xpdfrc, if it exists. (This is its default location; depending on build options, it may be placed elsewhere.) On Win32 systems, the xpdfrc file should be placed in the same directory as the executables.
Specifies a file with the mapping from character names to Unicode. This is used to handle PDF fonts that have valid encodings but no !ToUnicode? entry. Each line of a nameToUnicode file looks like this:
The hex-string is the Unicode (UCS-2) character index, and name is the corresponding character name. Multiple nameToUnicode files can be used; if a character name is given more than once, the code in the last specified file is used. There is a built-in default nameToUnicode table with all of Adobe's standard character names.
cidToUnicode registry-ordering map-file
Specifies the file with the mapping from character collection to Unicode. Each line of a cidToUnicode file represents one character:
The hex-string is the Unicode (UCS-2) index for that character. The first line maps CID 0, the second line CID 1, etc. File size is determined by size of the character collection. Only one file is allowed per character collection; the last specified file is used. There are no built-in cidToUnicode mappings.
unicodeMap encoding-name map-file
Specifies the file with mapping from Unicode to encoding-name. These encodings are used for X display fonts and text output (see below). Each line of a unicodeMap file represents a range of one or more Unicode characters which maps linearly to a range in the output encoding:
in-start-hex in-end-hex out-start-hex Entries for single characters can be abbreviated to:
in-hex out-hex The in-start-hex and in-end-hex fields (or the single in-hex field) specify the Unicode range. The out-start-hex field (or the out-hex field) specifies the start of the output encoding range. The length of the out-start-hex (or out-hex) string determines the length of the output characters (e.g., UTF-8 uses different numbers of bytes to represent characters in different ranges). Entries must be given in increasing Unicode order. Only one file is allowed per encoding; the last specified file is used. The Latin1, ASCII7, Symbol, !ZapfDingbats?, and UTF-8 encodings are predefined.
cMapDir registry-ordering dir
Specifies a search directory, dir, for CMaps for the registry-ordering character collection. There can be multiple directories for a particular collection. There are no default CMap directories.
displayFontX PDF-font-name XLFD encoding-name
Maps a PDF font, PDF-font-name, to an X font, XLFD, for display. The XLFD (X Logical Font Descriptor) should contain the string encoding-name must be defined with the unicodeMap command (see above). By default, the Base-14 fonts are mapped to standard X fonts, using the Latin1, Symbol, and !ZapfDingbats? encodings.
displayFontT1 PDF-font-name T1-file
Maps a PDF font, PDF-font-name, to a Type 1 font for display. The Type 1 font file, T1-file, should be a standard .pfa or .pfb file.
displayFontTT PDF-font-name TT-file
displayCIDFontX registry-ordering XLFD encoding-name
Maps the registry-ordering character collection to the X font, XLFD, for display. The encoding given by encoding-name must be defined with the unicodeMap command. There are no default display CID font mappings.
psPaperSize width(pts) height(pts)
psPaperSize letter | legal | A4 | A3
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
psDuplex yes | no
If set to
psLevel level1 | level1sep | level2 | level2sep
Sets the !PostScript level to generate. This defaults to
psFont PDF-font-name PS-font-name
When the PDF-font-name font is used in a PDF file, it will be translated to the !PostScript font PS-font-name, which is assumed to be resident in the printer. Typically, PDF-font-name and PS-font-name are the same. By default, only the Base-14 fonts are assumed to be resident.
psEmbedType1Fonts yes | no
If set to
psEmbedTrueTypeFonts yes | no
If set to
psOPI yes | no
If set to
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
Sets the encoding to use for text output. (This can be overridden with the encoding-name must be defined with the unicodeMap command (see above). This defaults to
textEOL unix | dos | mac
Sets the end-of-line convention to use for text output. The options are:
t1libControl none | plain | low | high
Sets the type of font rendering for t1lib (the Type 1 rasterizer) to use. Options are
freetypeControl none | plain | low | high
Sets the command executed when you click on a URL link. The string
mapNumericCharNames yes | no
If set to
errQuiet yes | no
The following is a sample xpdfrc file.
This is the default location for the system-wide configuration file. Depending on build options, it may be placed elsewhere.