6 xpdf - Portable Document Format (PDF) file viewer for X
10 xpdf [options] [PDF-file [page | +dest]]
13 Xpdf is a viewer for Portable Document Format (PDF) files.
14 (These are also sometimes also called 'Acrobat' files,
15 from the name of Adobe's PDF software.) Xpdf runs under
16 the X Window System on UNIX, VMS, and OS/2.
18 To run xpdf, simply type:
22 where file.pdf is your PDF file. The file name can be
23 followed by a number specifying the page which should be
24 displayed first, e.g.:
28 You can also give a named destination, prefixed with '+'
29 in place of the page number. (This is only useful with
30 PDF files that provide named destination targets.)
32 You can also start xpdf without opening any files:
37 Xpdf reads a configuration file at startup. It first
38 tries to find the user's private config file, ~/.xpdfrc.
39 If that doesn't exist, it looks for a system-wide config
40 file, typically /usr/local/etc/xpdfrc (but this location
41 can be changed when xpdf is built). See the xpdfrc(5) man
45 Many of the following options can be set with configura-
46 tion file commands or X resources. These are listed in
47 square brackets with the description of the corresponding
51 Set the initial window geometry. (-geometry is
52 equivalent.) [X resource: xpdf.geometry]
55 Set the window title. By default, the title will
56 be "xpdf: foo.pdf". [X resource: xpdf.title]
58 -cmap Install a private colormap. This is ignored on
59 TrueColor visuals. [X resource: xpdf.installCmap]
62 Set the size of largest RGB cube xpdf will try to
63 allocate. The default is 5 (for a 5x5x5 cube); set
64 to a smaller number to conserve color table
65 entries. This is ignored with private colormaps
66 and on TrueColor visuals. [X resource:
69 -rv Set reverse video mode. This reverses the colors
70 of everything except images. It may not always
71 produce great results for PDF files which do weird
72 things with color. This also causes the paper
73 color to default to black. [X resource:
77 Set the "paper color", i.e., the background of the
78 page display. This will not work too well with PDF
79 files that do things like filling in white behind
80 the text. [X resource: xpdf.paperColor]
83 Set the matte color, i.e., the color used for back-
84 ground outside the actual page area. (There is a
85 separate setting, xpdf.fullScreenMatteColor, for
86 full-screen mode.) [X resource: xpdf.matteColor]
89 Set the initial zoom factor. A number specifies a
90 zoom percentage, where 100 means 72 dpi.You may
91 also specify 'page', to fit the page to the window
92 size, or 'width', to fit the page width to the win-
93 dow width. [config file: initialZoom; or X
94 resource: xpdf.initialZoom]
96 -cont Start in continuous view mode, i.e., with one ver-
97 tical scroll bar for the whole document. [config
101 Enable or disable t1lib (a Type 1 font rasterizer).
102 This defaults to "yes". [config file: enableT1lib]
105 Enable or disable FreeType (a TrueType / Type 1
106 font rasterizer). This defaults to "yes". [config
107 file: enableFreeType]
110 Enable or disable font anti-aliasing. This
111 defaults to "yes". [config file: antialias]
114 Enable or disable vector anti-aliasing. This
115 defaults to "yes". [config file: vectorAntialias]
118 Set the default file name for PostScript output
119 (i.e., the name which will appear in the print dia-
120 log). This can also be of the form '|command' to
121 pipe the PostScript through a command. [config
125 Set the paper size to one of "letter", "legal",
126 "A4", or "A3". This can also be set to "match",
127 which will set the paper size to match the size
128 specified in the PDF file. [config file: psPaper-
132 Set the paper width, in points. [config file:
136 Set the paper height, in points. [config file:
140 Generate Level 1 PostScript. The resulting
141 PostScript files will be significantly larger (if
142 they contain images), but will print on Level 1
143 printers. This also converts all images to black
144 and white. [config file: psLevel]
147 Sets the encoding to use for text output. The
148 encoding-name must be defined with the unicodeMap
149 command (see xpdfrc(5)). This defaults to "Latin1"
150 (which is a built-in encoding). [config file: tex-
153 -eol unix | dos | mac
154 Sets the end-of-line convention to use for text
155 output. [config file: textEOL]
158 Specify the owner password for the PDF file. Pro-
159 viding this will bypass all security restrictions.
162 Specify the user password for the PDF file.
165 Open xpdf in full-screen mode, useful for presenta-
169 Start/contact xpdf remote server with specified
170 name (see the REMOTE SERVER MODE section below).
173 Execute a command (see the COMMANDS section below)
174 in an xpdf remote server window (with -remote
178 Reload xpdf remote server window (with -remote
181 -raise Raise xpdf remote server window (with -remote
184 -quit Kill xpdf remote server (with -remote only).
186 -cmd Print commands as they're executed (useful for
187 debugging). [config file: printCommands]
189 -q Don't print any messages or errors. [config file:
193 Read config-file in place of ~/.xpdfrc or the sys-
194 tem-wide config file.
196 -v Print copyright and version information.
198 -h Print usage information. (-help and --help are
201 Several other standard X options and resources will work
205 [X resource: xpdf.display]
208 (-foreground is equivalent.) [X resource:
212 (-background is equivalent.) [X resource:
216 (-fn is equivalent.) [X resource: xpdf*fontList]
218 The color and font options only affect the user interface
219 elements, not the PDF display (the 'paper').
221 The following X resources do not have command line option
225 Enables (if set to true) or disables (if set to
226 false) the tool-tips on the toolbar buttons.
228 xpdf.fullScreenMatteColor
229 Sets the matte color to be used in full-screen
230 mode. The default setting is "black".
233 On-screen controls, at the bottom of the xpdf window
234 left/right arrow buttons
235 Move to the previous/next page.
237 double left/right arrow buttons
238 Move backward or forward by ten pages.
240 dashed left/right arrow buttons
241 Move backward or forward along the history path.
244 Move to a specific page number. Click in the box
245 to activate it, type the page number, then hit
249 Change the zoom factor (see the description of the
256 Bring up a dialog for generating a PostScript file.
257 The dialog has options to set the pages to be
258 printed and the PostScript file name. The file
259 name can be '-' for stdout or '|command' to pipe
260 the PostScript through a command, e.g., '|lpr'.
263 Bring up the 'about xpdf' window.
266 The space between the '?' and 'Quit' buttons is
267 used to show the URL or external file name when the
268 mouse is over a link.
275 Pressing the right mouse button will post a popup menu
276 with the following commands:
279 Open a new PDF file via a file requester.
281 Open in new window...
282 Create a new window and open a new PDF file via a
285 Reload Reload the current PDF file. Note that Xpdf will
286 reload the file automatically (on a page change or
287 redraw) if it has changed since it was last loaded.
290 Save the current file via a file requester.
293 Toggles between single page and continuous view
296 Rotate counterclockwise
297 Rotate the page 90 degrees counterclockwise.
300 Rotate the page 90 degrees clockwise. The two
301 rotate commands are intended primarily for PDF
302 files where the rotation isn't correctly specified
306 Zoom in to the currently selected rectangle.
308 Close Close the current window. If this is the only open
309 window, the document is closed, but the window is
310 left open (i.e., this menu command won't quit
317 If the PDF contains an outline (a.k.a., bookmarks), there
318 will be an outline pane on the left side of the window.
319 The width of the outline pane is adjustable with a verti-
320 cal split bar via the knob near its bottom end.
324 Dragging the mouse with the left button held down will
325 highlight an arbitrary rectangle. Any text inside this
326 rectangle will be copied to the X selection buffer.
330 Clicking on a hyperlink will jump to the link's
331 destination. A link to another PDF document will make
332 xpdf load that document. A 'launch' link to an executable
333 program will display a dialog, and if you click 'ok', exe-
334 cute the program. URL links call an external command (see
335 the WEB BROWSERS section below).
339 Dragging the mouse with the middle button held down pans
344 o Open a new PDF file via a file requester.
346 r Reload the current PDF file. Note that Xpdf will
347 reload the file automatically (on a page change or
348 redraw) if it has changed since it was last loaded.
351 Redraw the current page.
354 Close the current window.
360 Find next occurrence.
365 n Move to the next page. Scrolls to the top of the
366 page, unless scroll lock is turned on.
368 p Move to the previous page. Scrolls to the top of
369 the page, unless scroll lock is turned on.
371 <Space> or <PageDown> or <Next>
372 Scroll down on the current page; if already at bot-
373 tom, move to next page.
375 <Backspace> or <Delete> or <PageUp> or <Previous>
376 Scroll up on the current page; if already at top,
377 move to previous page.
379 v Move forward along the history path.
381 b Move backward along the history path.
383 <Home> Scroll to top of current page.
385 <End> Scroll to bottom of current page.
388 Scroll to first page of document.
391 Scroll to last page of document.
393 arrows Scroll the current page.
395 g Activate the page number text field ("goto page").
397 0 Set the zoom factor to 125%.
399 + Zoom in (increment the zoom factor by 1).
401 - Zoom out (decrement the zoom factor by 1).
403 z Set the zoom factor to 'page' (fit page to window).
405 w Set the zoom factor to 'width' (fit page width to
408 alt-F Toggle full-screen mode.
413 If you want to run xpdf automatically from netscape or
414 mosaic (and probably other browsers) when you click on a
415 link to a PDF file, you need to edit (or create) the files
416 .mime.types and .mailcap in your home directory. In
417 .mime.types add the line:
421 In .mailcap add the lines:
423 # Use xpdf to view PDF files.
424 application/pdf; xpdf -q %s
426 Make sure that xpdf is on your executable search path.
428 When you click on a URL link in a PDF file, xpdf will exe-
429 cute the command specified by the urlCommand config file
430 option, replacing an occurrence of '%s' with the URL. For
431 example, to call netscape with the URL, add this line to
434 urlCommand "netscape -remote 'openURL(%s)'"
437 Xpdf's key and mouse bindings are user-configurable, using
438 the bind and unbind options in the config file (see
439 xpdfrc(5)). The bind command allows you to bind a key or
440 mouse button to a sequence of one or more commands.
443 The following commands are supported:
446 Go to the specified page.
448 gotoPageNoScroll(page)
449 Go to the specified page, with the current relative
453 Go to a named destination.
456 Go to the last page in the PDF file.
459 Go to the last page in the PDF file, with the cur-
460 rent relative scroll position.
466 Go to the next page, with the current relative
470 Go to the previous page.
473 Go to the previous page, with the current relative
476 pageUp Scroll up by one screenful.
479 Scroll down by one screenful.
482 Scroll left by n pixels.
485 Scroll right by n pixels.
488 Scroll up by n pixels.
491 Scroll down by n pixels.
494 Scroll up by n pixels, moving to the previous page
497 scrollDownPrevPage(n)
498 Scroll down by n pixels, moving to the next page if
502 Scroll to the top edge of the current page, with no
506 Scroll to the bottom edge of the current page, with
507 no horizontal movement.
510 Scroll to the left edge of the current page, with
511 no vertical movement.
514 Scroll to the right edge of the current page, with
515 no vertical movement.
518 Scroll to the top-left corner of the current page.
521 Scroll to the bottom-right corner of the current
525 Move forward along the history path.
528 Move backward along the history path.
531 Set the zoom factor to z%.
534 Set the zoom factor to fit-page.
537 Set the zoom factor to fit-width.
539 zoomIn Zoom in - go to the next higher zoom factor.
542 Zoom out - go the next lower zoom factor.
545 Go to continuous view mode.
548 Go to single-page view mode.
551 Toggle between continuous and single page view
555 Go to full-screen mode.
558 Go to window (non-full-screen) mode.
561 Toggle between full-screen and window modes.
563 open Open a PDF file in this window, using the open dia-
567 Open a PDF file in a new window, using the open
571 Open a specified PDF file in this window.
573 openFileInNewWin(file)
574 Open a specified PDF file in a new window.
576 openFileAtDest(file,dest)
577 Open a specified PDF file in this window and go to
580 openFileAtDestInNewWin(file,dest)
581 Open a specified PDF file in a new window and go to
584 reload Reload the current PDF file.
586 redraw Redraw the window.
588 raise Raise the window to the front.
593 run(external-command-string)
594 Run an external command. The following escapes are
595 allowed in the command string:
597 %f => PDF file name (or an empty string if no
599 %b => PDF file base name, i.e., file name minus
600 the extension (or an empty string if no
602 %u => link URL (or an empty string if not over
604 %x => selection upper-left x coordinate
605 (or 0 if there is no selection)
606 %y => selection upper-left y coordinate
607 (or 0 if there is no selection)
608 %X => selection lower-right x coordinate
609 (or 0 if there is no selection)
610 %Y => selection lower-right y coordinate
611 (or 0 if there is no selection)
616 Open the outline pane.
619 Close the outline pane.
622 Toggle the outline pane between open and closed.
625 Scroll the outline down by n increments.
628 Scroll the outline up by n increments.
631 Set the keyboard focus to the main document window.
634 Set the keyboard focus to the page number text box.
636 find Open the 'find' dialog.
639 Finds the next occurrence of the search string (no
642 print Open the 'print' dialog.
644 about Open the 'about' dialog.
648 The following commands depend on the current mouse posi-
652 Start a selection, which will be extended as the
659 Start a pan, which will scroll the document as the
665 Display the popup menu.
668 Follow a hyperlink (does nothing if the mouse is
672 Follow a hyperlink, opening PDF files in a new win-
673 dow (does nothing if the mouse is not over a link).
674 For links to non-PDF files, this command is identi-
678 Same as followLink, but does nothing if there is a
679 non-empty selection. (This is useful as a mouse
682 followLinkInNewWinNoSel
683 Same as followLinkInNewWin, but does nothing if
684 there is a non-empty selection. (This is useful as
685 a mouse button binding.)
688 The default mouse bindings are as follows:
690 bind mousePress1 any startSelection
691 bind mouseRelease1 any endSelection followLinkNoSel
692 bind mousePress2 any startPan
693 bind mouseRelease2 any endPan
694 bind mousePress3 any postPopupMenu
695 bind mousePress4 any scrollUpPrevPage(16)
696 bind mousePress5 any scrollDownNextPage(16)
697 bind mousePress6 any scrollLeft(16)
698 bind mousePress7 any scrollRight(16)
700 The default key bindings are as follows:
702 bind ctrl-home any gotoPage(1)
703 bind home any scrollToTopLeft
704 bind ctrl-end any gotoLastPage
705 bind end any scrollToBottomRight
707 bind backspace any pageUp
708 bind delete any pageUp
709 bind pgdn any pageDown
710 bind space any pageDown
711 bind left any scrollLeft(16)
712 bind right any scrollRight(16)
713 bind up any scrollUp(16)
714 bind down any scrollDown(16)
722 bind ctrl-g any findNext
723 bind ctrl-p any print
724 bind n scrLockOff nextPage
725 bind N scrLockOff nextPage
726 bind n scrLockOn nextPageNoScroll
727 bind N scrLockOn nextPageNoScroll
728 bind p scrLockOff prevPage
729 bind P scrLockOff prevPage
730 bind p scrLockOn prevPageNoScroll
731 bind P scrLockOn prevPageNoScroll
733 bind b any goBackward
734 bind g any focusToPageNum
735 bind 0 any zoomPercent(125)
738 bind z any zoomFitPage
739 bind w any zoomFitWidth
740 bind alt-f any toggleFullScreenMode
741 bind ctrl-l any redraw
742 bind ctrl-w any closeWindow
747 Previous versions of xpdf included a "viKeys" X resource.
748 It is no longer available, but the following bindings are
751 bind h any scrollLeft(16)
752 bind l any scrollRight(16)
753 bind k any scrollUp(16)
754 bind j any scrollDown(16)
758 Xpdf can be started in remote server mode by specifying a
759 server name (in addition to the file name and page num-
762 xpdf -remote myServer file.pdf
764 If there is currently no xpdf running in server mode with
765 the name 'myServer', a new xpdf window will be opened. If
768 xpdf -remote myServer another.pdf 9
770 is issued, a new copy of xpdf will not be started.
771 Instead, the first xpdf (the server) will load another.pdf
772 and display page nine. If the file name is the same:
774 xpdf -remote myServer another.pdf 4
776 the xpdf server will simply display the specified page.
778 The -raise option tells the server to raise its window; it
779 can be specified with or without a file name and page num-
782 The -quit option tells the server to close its window and
786 The Xpdf tools use the following exit codes:
790 1 Error opening a PDF file.
792 2 Error opening an output file.
794 3 Error related to PDF permissions.
799 The xpdf software and documentation are copyright
800 1996-2007 Glyph & Cog, LLC.
803 pdftops(1), pdftotext(1), pdfinfo(1), pdffonts(1),
804 pdftoppm(1), pdfimages(1), xpdfrc(5)
805 http://www.foolabs.com/xpdf/
809 27 February 2007 xpdf(1)