Seth Woolley's Man Viewer

xpdfrc(5) - xpdfrc, xpdfrc - configuration file for Xpdf tools (version 3.00) - man 5 xpdfrc

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

xpdfrc(5)                                                            xpdfrc(5)



NAME
       xpdfrc - configuration file(1,n) for Xpdf tools (version(1,3,5) 3.00)

DESCRIPTION
       All  of the Xpdf tools read(2,n,1 builtins) a single configuration file.  If you have a
       .xpdfrc file(1,n) in(1,8) your home directory, it will  be  read.   Otherwise,  a
       system-wide configuration file(1,n) will be read(2,n,1 builtins) from /usr/local/etc/xpdfrc,
       if(3,n) it exists.  (This  is  its  default  location;  depending  on  build
       options,  it  may  be  placed elsewhere.)  On Win32 systems, the xpdfrc
       file(1,n) should be placed in(1,8) the same directory as the executables.

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

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

INCLUDE FILES
       include config-file
              Includes  the  specified  config(1,5)  file.   The  effect of this is
              equivalent to inserting the  contents  of  config-file  directly
              into  the  parent  config(1,5)  file(1,n) in(1,8) place of the include command.
              Config files can be nested arbitrarily deep.

CHARACTER MAPPING
       nameToUnicode map-file
              Specifies a file(1,n) with the mapping from character names  to  Uni-
              code.   This  is used to handle PDF fonts that have valid encod-
              ings but no ToUnicode entry.  Each line of a nameToUnicode  file(1,n)
              looks like this:

                   hex-string name

              The  hex-string is the Unicode (UCS-2) character index, and name
              is the corresponding  character  name.   Multiple  nameToUnicode
              files  can be used; if(3,n) a character name is given more than once,
              the code in(1,8) the last specified file(1,n) is used.  There is a  built-
              in(1,8)  default  nameToUnicode  table  with  all of Adobe's standard
              character names.

       cidToUnicode registry-ordering map-file
              Specifies the file(1,n) with the mapping from character collection to
              Unicode.   Each line of a cidToUnicode file(1,n) represents one char-
              acter:

                   hex-string

              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(1,n) is allowed per character collection; the last specified
              file(1,n) is used.  There are no built-in cidToUnicode mappings.

       unicodeToUnicode font-name-substring map-file
              This is used to work around PDF fonts which have incorrect  Uni-
              code information.  It specifies a file(1,n) which maps from the given
              (incorrect) Unicode indexes to the correct  ones.   The  mapping
              will  be  used  for  any font whose name contains font-name-sub-
              string(3,n).  Each line of a  unicodeToUnicode  file(1,n)  represents  one
              Unicode character:

                  in-hex out-hex1 out-hex2 ...

              The  in-hex field is an input (incorrect) Unicode index, and the
              rest of the fields are one  or  more  output  (correct)  Unicode
              indexes.   Each  occurrence  of  in-hex will be converted to the
              specified output sequence.

       unicodeMap encoding-name map-file
              Specifies the file(1,n) 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(1,n) represents a  range
              of one or more Unicode characters which maps linearly to a range
              in(1,8) 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(3,n)
              range.   The  length  of  the  out-start-hex (or out-hex) string(3,n)
              determines the length of the output characters (e.g., UTF-8 uses
              different  numbers of bytes to represent characters in(1,8) different
              ranges).  Entries must be given  in(1,8)  increasing  Unicode  order.
              Only  one  file(1,n) is allowed per encoding(3,n); the last specified file(1,n)
              is used.  The Latin1, ASCII7, Symbol, ZapfDingbats,  UTF-8,  and
              UCS-2 encodings are predefined.

       cMapDir registry-ordering dir
              Specifies  a  search  directory,  dir,  for  CMaps  for the reg-
              istry-ordering character  collection.   There  can  be  multiple
              directories  for  a particular collection.  There are no default
              CMap directories.

       toUnicodeDir dir
              Specifies a search directory, dir, for ToUnicode  CMaps.   There
              can  be  multiple  ToUnicode  directories.  There are no default
              ToUnicode directories.

DISPLAY FONTS
       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(1,n), T1-file, should be a standard .pfa or .pfb
              file.

       displayFontTT PDF-font-name TT-file
              Maps a PDF font, PDF-font-name, to a TrueType font for  display.
              The TrueType font file(1,n), TT-file, should be a standard .ttf file.

       displayNamedCIDFontT1 PDF-font-name T1-file
              Maps a specific PDF CID (16-bit) font, PDF-font-name, to  a  CID
              font  (16-bit  PostScript  font),  for  display.   There  are no
              default CID font mappings.

       displayCIDFontT1 registry-ordering T1-file
              Maps the registry-ordering character collection to  a  CID  font
              (16-bit  PostScript font), for display.  This mapping is used if(3,n)
              the font name doesn't match any of the fonts declared with  dis-
              playNamedCIDFont*  commands.  There are no default CID font map-
              pings.

       displayNamedCIDFontTT PDF-font-name TT-file
              Maps a specific PDF  CID  (16-bit)  font,  PDF-font-name,  to  a
              (16-bit)  TrueType  font, for display.  There are no default CID
              font mappings.

       displayCIDFontTT registry-ordering TT-file
              Maps the registry-ordering character collection  to  a  (16-bit)
              TrueType  font,  for  display.  This mapping is used if(3,n) the font
              name doesn't match any of the fonts declared with  displayNamed-
              CIDFont* commands.  There are no default CID font mappings.

       fontDir dir
              Specifies a search directory for external font files.  There can
              be multiple fontDir directories.  If a PDF file(1,n) uses a font  but
              doesn't  embed  it,  these  directories  will  be searched for a
              matching font file.  These fonts are used by both xpdf (for dis-
              play)  and  pdftops (for embedding in(1,8) the generated PostScript).
              Type 1 fonts must have a suffix of ".pfa", ".pfb", ".ps", or  no
              suffix at all.  TrueType fonts must have a ".ttf" suffix.  Other
              files in(1,8) these  directories  will  be  ignored.   There  are  no
              default fontDir directories.

POSTSCRIPT CONTROL
       psPaperSize width(pts) height(pts)
              Sets the paper size for PostScript output.  The width and height
              parameters give the paper size in(1,8) PostScript points.

       psPaperSize letter | legal | A4 | A3 | match
              Sets the paper size for PostScript output to  a  standard  size.
              The  default  paper size is set(7,n,1 builtins) when xpdf and pdftops are built,
              typically to "letter" or "A4".  This can also be set(7,n,1 builtins) to "match",
              which will set(7,n,1 builtins) the paper size to match the size specified in(1,8) the
              PDF file.

       psImageableArea llx lly urx ury
              Sets the imageable area for PostScript output.  The  four  inte-
              gers  are the coordinates of the lower-left and upper-right cor-
              ners  of  the  imageable  region,  specified  in(1,8)  points.   This
              defaults  to  the  full  paper size; the psPaperSize option will
              reset(1,7,1 tput) the imageable area coordinates.

       psCrop yes | no
              If set(7,n,1 builtins) to "yes", PostScript output is  cropped  to  the  CropBox
              specified  in(1,8) the PDF file(1,n); otherwise no cropping is done.  This
              defaults to "yes".

       psExpandSmaller yes | no
              If set(7,n,1 builtins) 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(7,n,1 builtins) to yes, PDF pages larger than  the  PostScript  imageable
              area  are shrunk to fit the imageable area.  Otherwise, no scal-
              ing is done on larger pages.  This defaults to "yes".

       psCenter yes | no
              If set(7,n,1 builtins) to yes, PDF pages smaller than the  PostScript  imageable
              area  (after  any  scaling)  are centered in(1,8) the imageable area.
              Otherwise, they are aligned at  the  lower-left  corner  of  the
              imageable area.  This defaults to "yes".

       psDuplex yes | no
              If  set(7,n,1 builtins) to "yes", the generated PostScript will set(7,n,1 builtins) 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".

       psFont PDF-font-name PS-font-name
              When the PDF-font-name font is used in(1,8) a PDF file(1,n),  it  will  be
              translated to the PostScript font PS-font-name, which is assumed
              to be resident in(1,8) 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.

       psNamedFont16 PDF-font-name wMode PS-font-name encoding(3,n)
              When the 16-bit font PDF-font-name is used in(1,8) a  PDF  file(1,n)  with
              the  wMode  writing  mode  and is not embedded, the PS-font-name
              font is substituted for it.  The writing mode must be either H'
              for  horizontal  or  V' for vertical.  The PS-font-name font is
              assumed to be resident in(1,8) the printer and to use  the  specified
              encoding(3,n)  (which must have been defined with the unicodeMap com-
              mand).

       psFont16 registry-ordering wMode PS-font-name encoding(3,n)
              When a 16-bit font using the registry-ordering character collec-
              tion  and  wMode writing mode is not embedded and does not match
              any  of  the  fonts  declared  in(1,8)  psNamedFont16  commands,  the
              PS-font-name  font is substituted for it.  The writing mode must
              be  either  H'  for  horizontal  or  V'  for  vertical.    The
              PS-font-name  font  is assumed to be resident in(1,8) the printer and
              to use the specified writing mode and encoding(3,n) (which must  have
              been defined with the unicodeMap command).

       psEmbedType1Fonts yes | no
              If  set(7,n,1 builtins) to "no", prevents embedding of Type 1 fonts in(1,8) generated
              PostScript.  This defaults to "yes".

       psEmbedTrueTypeFonts yes | no
              If set(7,n,1 builtins) to "no", prevents embedding of TrueType fonts  in(1,8)  gener-
              ated PostScript.  This defaults to "yes".

       psEmbedCIDTrueTypeFonts yes | no
              If set(7,n,1 builtins) to "no", prevents embedding of CID TrueType fonts in(1,8) gen-
              erated PostScript.  For Level 3 PostScript, this generates a CID
              font, for lower levels it generates a non-CID composite font.

       psEmbedCIDPostScriptFonts yes | no
              If  set(7,n,1 builtins)  to  "no", prevents embedding of CID PostScript fonts in(1,8)
              generated PostScript.  For Level 3 PostScript, this generates  a
              CID  font,  for  lower  levels  it generates a non-CID composite
              font.

       psOPI yes | no
              If set(7,n,1 builtins) to "yes",  generates  PostScript  OPI  comments  for  all
              images  and  forms  which  have OPI information.  This option is
              only available if(3,n) the Xpdf tools were compiled with OPI support.
              This defaults to "no".

       psASCIIHex yes | no
              If  set(7,n,1 builtins) to "yes", the ASCIIHexEncode filter(1,3x,3x curs_util) will be used instead
              of ASCII85Encode for binary data.  This defaults to "no".

       psFile file-or-command
              Sets the default PostScript file(1,n)  or  print  command  for  xpdf.
              Commands  start  with  a |' character; anything else is a file.
              If the file(1,n) name or command contains spaces it must  be  quoted.
              This  defaults  to unset, which tells xpdf to generate a name of
              the form <file(1,n)>.ps for a PDF file(1,n) <file(1,n)>.pdf.

       fontDir dir
              See the description above, in(1,8) the DISPLAY FONTS section.

TEXT CONTROL
       textEncoding encoding-name
              Sets the encoding(3,n) to use for text output.  (This can be overrid-
              den  with  the  "-enc"  switch(1,n) on the command line.)  The encod-
              ing-name must  be  defined  with  the  unicodeMap  command  (see
              above).  This defaults to "Latin1".

       textEOL unix | dos | mac
              Sets  the  end-of-line  convention  to use for text output.  The
              options are:

                  unix = LF
                  dos  = CR+LF
                  mac  = CR

              (This can be overridden with the "-eol" switch(1,n)  on  the  command
              line.)   The  default  value  is  based on the OS where xpdf and
              pdftotext were built.

       textPageBreaks yes | no
              If set(7,n,1 builtins) to "yes", text extraction will insert page  breaks  (form
              feed characters) between pages.  This defaults to "yes".

       textKeepTinyChars yes | no
              If  set(7,n,1 builtins)  to "yes", text extraction will keep all characters.  If
              set(7,n,1 builtins) to "no", text extraction will discard tiny (smaller  than  3
              point)  characters  after  the  first  50000  per page, avoiding
              extremely slow run times for PDF files that use special fonts to
              do shading or cross-hatching.  This defaults to "no".

MISCELLANEOUS SETTINGS
       initialZoom percentage | page | width
              Sets  the  initial  zoom factor.  A number specifies a zoom per-
              centage, where 100 means 72 dpi.  You may also  specify  page',
              to  fit the page to the window size, or width', to fit the page
              width to the window width.

       enableT1lib yes | no
              Enables or disables use of t1lib (a  Type  1  font  rasterizer).
              This  is  only  relevant if(3,n) the Xpdf tools were built with t1lib
              support.   ("enableT1lib"  replaces   the   old   "t1libControl"
              option.)  This option defaults to "yes".

       enableFreeType yes | no
              Enables  or  disables  use of FreeType (a TrueType / Type 1 font
              rasterizer).  This is only relevant if(3,n) the Xpdf tools were built
              with  FreeType  support.   ("enableFreeType"  replaces  the  old
              "freetypeControl" option.)  This option defaults to "yes".

       antialias yes | no
              Enables or disables font anti-aliasing in(1,8)  the  PDF  rasterizer.
              This option affects all font rasterizers.  ("antialias" replaces
              the anti-aliasing control provided by the old "t1libControl" and
              "freetypeControl" options.)  This default to "yes".

       urlCommand command
              Sets  the  command  executed  when you click on a URL link.  The
              string(3,n) "%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(3,n) "%s" will be replaced with the movie file(1,n) name.  This
              has no default value.

       mapNumericCharNames yes | no
              If  set(7,n,1 builtins)  to  "yes",  the  Xpdf tools will attempt to map various
              numeric character names sometimes used in(1,8) font subsets.  In some
              cases  this leads to usable text, and in(1,8) other cases it leads to
              gibberish -- there is no way for Xpdf to tell.  This defaults to
              "yes".

       printCommands yes | no
              If  set(7,n,1 builtins)  to  "yes", drawing commands are printed as they're exe-
              cuted (useful for debugging).  This defaults to "no".

       errQuiet yes | no
              If set(7,n,1 builtins) to "yes", this suppresses all error(8,n) and warning  messages
              from all of the Xpdf tools.  This defaults to "no".

EXAMPLES
       The following is a sample xpdfrc file.

       # from the Thai support package
       nameToUnicode /usr/local/share/xpdf/Thai.nameToUnicode

       # from the Japanese support package
       cidToUnicode Adobe-Japan1 /usr/local/share/xpdf/Adobe-Japan1.cidToUnicode
       unicodeMap   JISX0208     /usr/local/share/xpdf/JISX0208.unicodeMap
       cMapDir      Adobe-Japan1 /usr/local/share/xpdf/cmap/Adobe-Japan1

       # use the Base-14 Type 1 fonts from ghostscript
       # (note that this overrides the displayFontX command above)
       displayFontT1 Times-Roman           /usr/local/share/ghostscript/fonts/n021003l.pfb
       displayFontT1 Times-Italic          /usr/local/share/ghostscript/fonts/n021023l.pfb
       displayFontT1 Times-Bold            /usr/local/share/ghostscript/fonts/n021004l.pfb
       displayFontT1 Times-BoldItalic      /usr/local/share/ghostscript/fonts/n021024l.pfb
       displayFontT1 Helvetica             /usr/local/share/ghostscript/fonts/n019003l.pfb
       displayFontT1 Helvetica-Oblique     /usr/local/share/ghostscript/fonts/n019023l.pfb
       displayFontT1 Helvetica-Bold        /usr/local/share/ghostscript/fonts/n019004l.pfb
       displayFontT1 Helvetica-BoldOblique /usr/local/share/ghostscript/fonts/n019024l.pfb
       displayFontT1 Courier               /usr/local/share/ghostscript/fonts/n022003l.pfb
       displayFontT1 Courier-Oblique       /usr/local/share/ghostscript/fonts/n022023l.pfb
       displayFontT1 Courier-Bold          /usr/local/share/ghostscript/fonts/n022004l.pfb
       displayFontT1 Courier-BoldOblique   /usr/local/share/ghostscript/fonts/n022024l.pfb
       displayFontT1 Symbol                /usr/local/share/ghostscript/fonts/s050000l.pfb
       displayFontT1 ZapfDingbats          /usr/local/share/ghostscript/fonts/d050000l.pfb

       # use the Bakoma Type 1 fonts
       # (this assumes they happen to be installed in(1,8) /usr/local/fonts/bakoma)
       fontDir /usr/local/fonts/bakoma

       # set(7,n,1 builtins) some PostScript options
       psPaperSize          letter
       psDuplex             no
       psLevel              level2
       psEmbedType1Fonts    yes
       psEmbedTrueTypeFonts yes
       psFile               "| lpr -Pprinter5"

       # assume that the PostScript printer has the Univers and
       # Univers-Bold fonts
       psFont Univers      Univers
       psFont Univers-Bold Univers-Bold

       # set(7,n,1 builtins) the text output options
       textEncoding UTF-8
       textEOL      unix

       # misc options
       t1libControl    low
       freetypeControl low
       urlCommand      "netscape -remote 'openURL(%s)'"


FILES
       /usr/local/etc/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(2,n,1 builtins) in(1,8) place of the system-wide file.

AUTHOR
       The  Xpdf  software  and  documentation are copyright 1996-2004 Glyph &
       Cog, LLC.

SEE ALSO
       xpdf(1),  pdftops(1),  pdftotext(1),  pdfinfo(1),  pdftoppm(1),  pdfim-
       ages(1)
       http://www.foolabs.com/xpdf/



                                22 January 2004                      xpdfrc(5)

References for this manual (incoming links)