xpdf(1) xpdf(1) NAME xpdf - Portable Document Format (PDF) file(1,n) viewer for X (version(1,3,5) 3.00) SYNOPSIS xpdf [options] [PDF-file [page | +dest]] DESCRIPTION Xpdf is a viewer for Portable Document Format (PDF) files. (These are also sometimes also called Acrobat' files, from the name of Adobe's PDF software.) Xpdf runs under the X Window System on UNIX, VMS, and OS/2. To run xpdf, simply type: xpdf file.pdf where file.pdf is your PDF file. The file(1,n) name can be followed by a number specifying the page which should be displayed first, e.g.: xpdf file.pdf 18 You can also give a named(5,8) destination, prefixed with +' in(1,8) place of the page number. You can also start xpdf without opening any files: xpdf CONFIGURATION FILE Xpdf reads a configuration file(1,n) at startup. It first tries to find the user's private config(1,5) file(1,n), ~/.xpdfrc. If that doesn't exist, it looks for a system-wide config(1,5) file(1,n), typically /usr/local/etc/xpdfrc (but this location can be changed when xpdf is built). See the xpdfrc(5) man(1,5,7) page for details. OPTIONS Many of the following options can be set(7,n,1 builtins) with configuration file(1,n) com- mands or X resources. These are listed in(1,8) square brackets with the description of the corresponding command line option. -g geometry Set the initial window geometry. (-geometry is equivalent.) [X resource: xpdf.geometry] -title title Set the window title. By default, the title will be "xpdf: foo.pdf". [X resource: xpdf.title] -cmap Install a private colormap. This is ignored on TrueColor visu- als. [X resource: xpdf.installCmap] -rgb number Set the size of largest RGB cube xpdf will try to allocate. The default is 5 (for a 5x5x5 cube); set(7,n,1 builtins) to a smaller number to con- serve color table entries. This is ignored with private col- ormaps and on TrueColor visuals. [X resource: xpdf.rgbCubeSize] -rv Set reverse video mode. This reverses the colors of everything except images. It may not always produce great results for PDF files which do weird things with color. This also causes the paper color to default to black. [X resource: xpdf.reverseV- ideo] -papercolor color Set the "paper color", i.e., the background of the page display. This will not work too well with PDF files that do things like filling in(1,8) white behind the text. [X resource: xpdf.paperColor] -z zoom Set the initial zoom factor. A number specifies a zoom percent- age, 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. [config(1,5) file: initialZoom; or X resource: xpdf.initialZoom] -t1lib yes | no Enable or disable t1lib (a Type 1 font rasterizer). This defaults to "yes". [config(1,5) file: enableT1lib] -freetype yes | no Enable or disable FreeType (a TrueType / Type 1 font raster- izer). This defaults to "yes". [config(1,5) file: enableFreeType] -aa yes | no Enable or disable font anti-aliasing. This defaults to "yes". [config(1,5) file: antialias] -ps PS-file Set the default file(1,n) name for PostScript output. This can also be of the form |command' to pipe(2,8) the PostScript through a com- mand. [config(1,5) file: psFile] -paper size Set the paper size to one of "letter", "legal", "A4", or "A3". 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. [config(1,5) file: psPaperSize] -paperw size Set the paper width, in(1,8) points. [config(1,5) file: psPaperSize] -paperh size Set the paper height, in(1,8) points. [config(1,5) file: psPaperSize] -level1 Generate Level 1 PostScript. The resulting PostScript files will be significantly larger (if(3,n) they contain images), but will print on Level 1 printers. This also converts all images to black and white. [config(1,5) file: psLevel] -enc encoding-name Sets the encoding(3,n) to use for text output. The encoding-name must be defined with the unicodeMap command (see xpdfrc(5)). This defaults to "Latin1" (which is a built-in encoding(3,n)). [con- fig(1,5) file: textEncoding] -eol unix | dos | mac Sets the end-of-line convention to use for text output. [config(1,5) file: textEOL] -opw password Specify the owner password for the PDF file. Providing this will bypass all security restrictions. -upw password Specify the user password for the PDF file. -fullscreen Open xpdf in(1,8) a full-screen mode, useful for presentations. You may also want to specify '-bg black' (or similar) with this. (There is currently no way to switch(1,n) between window and full- screen modes on the fly.) -remote name Start/contact xpdf remote server with specified name (see the REMOTE SERVER MODE section below). -reload Reload xpdf remote server window (with -remote only). -raise Raise xpdf remote server window (with -remote only). -quit Kill xpdf remote server (with -remote only). -cmd Print commands as they're executed (useful for debugging). [config(1,5) file: printCommands] -q Don't print any messages or errors. [config(1,5) file: errQuiet] -cfg config-file Read config-file in(1,8) place of ~/.xpdfrc or the system-wide config(1,5) file. -v Print copyright and version(1,3,5) information. -h Print usage information. (-help and --help are equivalent.) Several other standard X options and resources will work as expected: -display display [X resource: xpdf.display] -fg color (-foreground is equivalent.) [X resource: xpdf*Foreground] -bg color (-background is equivalent.) [X resource: xpdf*Background] -font font (-fn is equivalent.) [X resource: xpdf*fontList] The color and font options only affect the user interface elements, not the PDF display (the paper'). The following X resources do not have command line option equivalents: xpdf.viKeys Enables the h', l', k' and j' keys for left, right, up, and down scrolling. CONTROLS On-screen controls, at the bottom of the xpdf window left/right arrow buttons Move to the previous/next page. double left/right arrow buttons Move backward or forward by ten pages. dashed left/right arrow buttons Move backward or forward along the history(1,3,n,1 builtins) path. Page' entry box Move to a specific page number. Click in(1,8) the box to activate it, type the page number, then hit return. zoom popup menu(3x,n,n tk_menuSetFocus) Change the zoom factor(1,6) (see the description of the -z option above). binoculars button Find a text string. print button Bring up a dialog(1,3,n) for generating a PostScript file. The dialog(1,3,n) has options to set(7,n,1 builtins) the pages to be printed and the PostScript file(1,n) name. The file(1,n) name can be -' for stdout or |command' to pipe(2,8) the PostScript through a command, e.g., |lpr'. ?' button Bring up the about xpdf' window. link(1,2) info(1,5,n) The space between the ?' and Quit' buttons is used to show the URL or external file(1,n) name when the mouse is over a link. Quit' button Quit xpdf. Menu Pressing the right mouse button will post a popup menu(3x,n,n tk_menuSetFocus) with the follow- ing commands: Open... Open a new PDF file(1,n) via a file(1,n) requester. Open in(1,8) new window... Create a new window and open(2,3,n) a new PDF file(1,n) via a file(1,n) requester. Reload Reload the current PDF file. Note that Xpdf will reload the file(1,n) automatically (on a page change or redraw) if(3,n) it has changed since it was last loaded. Save as... Save the current file(1,n) via a file(1,n) requester. Rotate counterclockwise Rotate the page 90 degrees counterclockwise. Rotate clockwise Rotate the page 90 degrees clockwise. The two rotate commands are intended primarily for PDF files where the rotation isn't correctly specified in(1,8) the file. Close Close the current window. If this is the only open(2,3,n) window, the document is closed, but the window is left open(2,3,n) (i.e., this menu(3x,n,n tk_menuSetFocus) command won't quit xpdf). Quit Quit xpdf. Outline If the PDF contains an outline (a.k.a., bookmarks), there will be an outline pane on the left side of the window. The width of the outline pane is adjustable with a vertical split(1,n) bar via the knob near its bot- tom end. Text selection Dragging the mouse with the left button held down will highlight an arbitrary rectangle. Any text inside this rectangle will be copied to the X selection buffer. Links Clicking on a hyperlink will jump to the link(1,2)'s destination. A link(1,2) to another PDF document will make xpdf load(7,n) that document. A launch' link(1,2) to an executable program will display a dialog(1,3,n), and if(3,n) you click ok', execute the program. URL links call an external command (see the WEB BROWSERS section below). Panning Dragging the mouse with the middle button held down pans the window. Key bindings o Open a new PDF file(1,n) via a file(1,n) requester. r Reload the current PDF file. Note that Xpdf will reload the file(1,n) automatically (on a page change or redraw) if(3,n) it has changed since it was last loaded. control-L Redraw the current page. control-W Close the current window. f or control-F Find a text string. control-G Find next occurrence. control-P Print. n Move to the next page. Scrolls to the top of the page, unless scroll lock is turned on. p Move to the previous page. Scrolls to the top of the page, unless scroll lock is turned on. <Space> or <PageDown> or <Next> Scroll down on the current page; if(3,n) already at bottom, move(3x,7,3x curs_move) to next page. <Backspace> or <Delete> or <PageUp> or <Previous> Scroll up on the current page; if(3,n) already at top, move(3x,7,3x curs_move) to previ- ous page. v Move forward along the history(1,3,n,1 builtins) path. b Move backward along the history(1,3,n,1 builtins) path. <Home> Scroll to top of current page. <End> Scroll to bottom of current page. control-<Home> Scroll to first page of document. control-<End> Scroll to last page of document. arrows Scroll the current page. g Activate the page number text field ("goto page"). 0 Set the zoom factor(1,6) to zero (72 dpi). + Zoom in(1,8) (increment the zoom factor(1,6) by 1). - Zoom out (decrement the zoom factor(1,6) by 1). z Set the zoom factor(1,6) to 'page' (fit page to window). w Set the zoom factor(1,6) to 'width' (fit page width to window). q Quit xpdf. WEB BROWSERS If you want to run xpdf automatically from netscape or mosaic (and probably other browsers) when you click on a link(1,2) to a PDF file(1,n), you need to edit (or create) the files .mime.types and .mailcap in(1,8) your home directory. In .mime.types add the line: application/pdf pdf In .mailcap add the lines: # Use xpdf to view PDF files. application/pdf; xpdf -q %s Make sure that xpdf is on your executable search path. When you click on a URL link(1,2) in(1,8) a PDF file(1,n), xpdf will execute the com- mand specified by the urlCommand config(1,5) file(1,n) option, replacing an occurrence of %s' with the URL. For example, to call netscape with the URL, add this line to your config(1,5) file: urlCommand "netscape -remote 'openURL(%s)'" REMOTE SERVER MODE Xpdf can be started in(1,8) remote server mode by specifying a server name (in(1,8) addition to the file(1,n) name and page number). For example: xpdf -remote myServer file.pdf If there is currently no xpdf running in(1,8) server mode with the name myServer', a new xpdf window will be opened. If another command: xpdf -remote myServer another.pdf 9 is issued, a new copy of xpdf will not be started. Instead, the first xpdf (the server) will load(7,n) another.pdf and display page nine. If the file(1,n) name is the same: xpdf -remote myServer another.pdf 4 the xpdf server will simply display the specified page. The -raise option tells the server to raise(3,n) its window; it can be spec- ified with or without a file(1,n) name and page number. The -quit option tells the server to close(2,7,n) its window and exit. EXIT CODES The Xpdf tools use the following exit(3,n,1 builtins) codes: 0 No error. 1 Error opening a PDF file. 2 Error opening an output file. 3 Error related to PDF permissions. 99 Other error. AUTHOR The xpdf software and documentation are copyright 1996-2004 Glyph & Cog, LLC. SEE ALSO pdftops(1), pdftotext(1), pdfinfo(1), pdffonts(1), pdftoppm(1), pdfim- ages(1), xpdfrc(5) http://www.foolabs.com/xpdf/ 22 January 2004 xpdf(1)