| 1 |
.\" Copyright 1996-2025 Glyph & Cog, LLC |
| 2 |
.TH xpdf 1 "14 Nov 2025" |
| 3 |
.SH NAME |
| 4 |
xpdf \- Portable Document Format (PDF) file viewer (version 4.06) |
| 5 |
.SH SYNOPSIS |
| 6 |
.B xpdf |
| 7 |
[options] |
| 8 |
.RI [ PDF-file |
| 9 |
.RI [: page " | +" dest "]] ..." |
| 10 |
.PP |
| 11 |
.B xpdf |
| 12 |
[options] |
| 13 |
.B -remote |
| 14 |
.IR remote-name " [" command " ...]" |
| 15 |
.PP |
| 16 |
.B xpdf |
| 17 |
[options] |
| 18 |
.B -open |
| 19 |
.RI "[" PDF-file "]" |
| 20 |
.SH DESCRIPTION |
| 21 |
.B Xpdf |
| 22 |
is a viewer for Portable Document Format (PDF) files. (These are also |
| 23 |
sometimes also called \'Acrobat' files, from the name of Adobe's PDF |
| 24 |
software.) Xpdf uses the Qt GUI toolkit and runs on Unix, OS X, and |
| 25 |
Windows. |
| 26 |
.PP |
| 27 |
To run xpdf, type: |
| 28 |
.PP |
| 29 |
.RS |
| 30 |
xpdf file.pdf |
| 31 |
.RE |
| 32 |
.PP |
| 33 |
where |
| 34 |
.I file.pdf |
| 35 |
is your PDF file. The file name can be followed by a page number to |
| 36 |
be displayed, prefixed with a colon: |
| 37 |
.PP |
| 38 |
.RS |
| 39 |
xpdf file.pdf :18 |
| 40 |
.RE |
| 41 |
.PP |
| 42 |
or by a named destination, prefixed with \'+' (this is only useful |
| 43 |
with PDF files that provide named destination targets): |
| 44 |
.PP |
| 45 |
.RS |
| 46 |
xpdf file.pdf +destinationA |
| 47 |
.RE |
| 48 |
.PP |
| 49 |
If you specify multiple files, they will each be opened in a separate |
| 50 |
tab: |
| 51 |
.PP |
| 52 |
.RS |
| 53 |
xpdf file1.pdf file2.pdf :18 file3.pdf |
| 54 |
.RE |
| 55 |
.PP |
| 56 |
You can also start xpdf without opening any files: |
| 57 |
.PP |
| 58 |
.RS |
| 59 |
xpdf |
| 60 |
.RE |
| 61 |
.SH CONFIGURATION FILE |
| 62 |
Xpdf reads a configuration file at startup. It first tries to find |
| 63 |
the user's private config file, ~/.xpdfrc. If that doesn't exist, it |
| 64 |
looks for a system-wide config file, typically /etc/xpdfrc (but this |
| 65 |
location can be changed when xpdf is built). See the |
| 66 |
.BR xpdfrc (5) |
| 67 |
man page for details. |
| 68 |
.SH OPTIONS |
| 69 |
The following command line options are available. All command line |
| 70 |
options must come before any PDF files to be opened. |
| 71 |
.PP |
| 72 |
Many of the options can be set with configuration file commands. |
| 73 |
These are listed in square brackets with the description of the |
| 74 |
corresponding command line option. |
| 75 |
.TP |
| 76 |
.BI \-geometry " geometry" |
| 77 |
Set the initial window geometry. |
| 78 |
.TP |
| 79 |
.BI \-title " title" |
| 80 |
Set the window title. By default, the title will be "xpdf: foo.pdf". |
| 81 |
.TP |
| 82 |
.BI \-open " \fR[\fPPDF-file\fR]\fP" |
| 83 |
This option sets up a default remote server. If Xpdf is already |
| 84 |
running (with the "-open" switch), the PDF file (if any) is opened in |
| 85 |
a new tab. If Xpdf (with the "-open" switch) is not already running, |
| 86 |
starts Xpdf and opens the PDF file (if any). This is useful for GUI |
| 87 |
desktop environments, e.g., the typical double-click on a PDF file |
| 88 |
case. |
| 89 |
.TP |
| 90 |
.B \-rv |
| 91 |
Set reverse video mode. This reverses the colors of everything except |
| 92 |
images. It may not always produce great results for PDF files which |
| 93 |
do weird things with color. This also causes the paper color to |
| 94 |
default to black. |
| 95 |
.TP |
| 96 |
.BI \-papercolor " color" |
| 97 |
Set the "paper color", i.e., the background of the page display. The |
| 98 |
color can be #RRGGBB (hexadecimal) or a named color. This option will |
| 99 |
not work well with PDF files that do things like filling in white |
| 100 |
behind the text. |
| 101 |
.RB "[config file: " paperColor ] |
| 102 |
.TP |
| 103 |
.BI \-mattecolor " color" |
| 104 |
Set the matte color, i.e., the color used for background outside the |
| 105 |
actual page area. The color can be #RRGGBB (hexadecimal) or a named |
| 106 |
color. |
| 107 |
.RB "[config file: " matteColor ] |
| 108 |
.TP |
| 109 |
.BI \-fsmattecolor " color" |
| 110 |
Set the matte color for full-screen mode. The color can be #RRGGBB |
| 111 |
(hexadecimal) or a named color. |
| 112 |
.RB "[config file: " fullScreenMatteColor ] |
| 113 |
.TP |
| 114 |
.BI \-z " zoom" |
| 115 |
Set the initial zoom factor. A number specifies a zoom percentage, |
| 116 |
where 100 means 72 dpi. You may also specify \'page', to fit the page |
| 117 |
to the window size, or \'width', to fit the page width to the window |
| 118 |
width. |
| 119 |
.RB "[config file: " initialZoom ] |
| 120 |
.TP |
| 121 |
.BI \-rot " angle" |
| 122 |
Rotate pages by 0 (the default), 90, 180, or 270 degrees. |
| 123 |
.TP |
| 124 |
.BI \-aa " yes | no" |
| 125 |
Enable or disable font anti-aliasing. This defaults to "yes". |
| 126 |
.RB "[config file: " antialias ] |
| 127 |
.TP |
| 128 |
.BI \-aaVector " yes | no" |
| 129 |
Enable or disable vector anti-aliasing. This defaults to "yes". |
| 130 |
.RB "[config file: " vectorAntialias ] |
| 131 |
.TP |
| 132 |
.BI \-enc " encoding-name" |
| 133 |
Sets the encoding to use for text output. The |
| 134 |
.I encoding\-name |
| 135 |
must be defined with the unicodeMap command (see |
| 136 |
.BR xpdfrc (5)). |
| 137 |
This defaults to "Latin1" (which is a built-in encoding). |
| 138 |
.RB "[config file: " textEncoding ] |
| 139 |
.TP |
| 140 |
.BI \-pw " password" |
| 141 |
Specify the password for the PDF file. This can be either the owner |
| 142 |
password (which will bypass all security restrictions) or the user |
| 143 |
password. |
| 144 |
.TP |
| 145 |
.B \-fullscreen |
| 146 |
Open xpdf in full-screen mode, useful for presentations. |
| 147 |
.TP |
| 148 |
.BI \-remote " remote-name" |
| 149 |
Start Xpdf in remote server mode. See the REMOTE SERVER MODE section. |
| 150 |
.TP |
| 151 |
.BI \-display " display" |
| 152 |
Set the X display (only available with X11). |
| 153 |
.TP |
| 154 |
.B \-cmd |
| 155 |
Print commands as they're executed (useful for debugging). |
| 156 |
.RB "[config file: " printCommands ] |
| 157 |
.TP |
| 158 |
.BI \-tabstate " tabstate-file" |
| 159 |
Sets the file used by the loadTabState and saveTabState commands. |
| 160 |
.RB "[config file: " tabStateFile ] |
| 161 |
.TP |
| 162 |
.BI \-cfg " config-file" |
| 163 |
Read |
| 164 |
.I config-file |
| 165 |
in place of ~/.xpdfrc or the system-wide config file. |
| 166 |
.TP |
| 167 |
.B \-v |
| 168 |
Print copyright and version information. |
| 169 |
.TP |
| 170 |
.B \-h |
| 171 |
Print usage information. |
| 172 |
.RB ( \-help |
| 173 |
and |
| 174 |
.B \-\-help |
| 175 |
are equivalent.) |
| 176 |
.PP |
| 177 |
.SH CONTROLS |
| 178 |
.SS Toolbar |
| 179 |
.TP |
| 180 |
.B "toggle sidebar button" |
| 181 |
Toggles (i.e., shows or hides) the sidebar. |
| 182 |
.TP |
| 183 |
.B "status indicator" |
| 184 |
This icon is animated while Xpdf is rendering a page. It turns red |
| 185 |
when an error or warning has been issued. Clicking on it opens the |
| 186 |
error dialog. |
| 187 |
.TP |
| 188 |
.B "selection mode" |
| 189 |
This icon is an "I-beam" in linear selection mode, and an arrow in |
| 190 |
block selection mode. Clicking on it toggles between the two |
| 191 |
selection modes. |
| 192 |
.TP |
| 193 |
.B "page number entry box" |
| 194 |
Move to a specific page number. Click in the box to activate it, type |
| 195 |
the page number, then hit return. This will instead display and |
| 196 |
accept page labels, if the "view - page labels" menu item is checked. |
| 197 |
.TP |
| 198 |
.B "left/right arrow buttons" |
| 199 |
Go backward or forward along the history path. |
| 200 |
.TP |
| 201 |
.B "zoom out/in buttons" |
| 202 |
Zoom out or in (i.e., change magnification) incrementally. |
| 203 |
.TP |
| 204 |
.B "zoom popup menu" |
| 205 |
Change the zoom factor (see the description of the \-z option above). |
| 206 |
.TP |
| 207 |
.B "fit width button" |
| 208 |
Change the zoom factor to fit the page width to the window width. |
| 209 |
.TP |
| 210 |
.B "fit page button" |
| 211 |
Change the zoom factor to fit the page to the window size. |
| 212 |
.TP |
| 213 |
.B "find entry box" |
| 214 |
Find a text string. Click in the box to activate it, type a search |
| 215 |
string, then hit return. |
| 216 |
.TP |
| 217 |
.B "find next button" |
| 218 |
Find the next occurrence of the search string. |
| 219 |
.TP |
| 220 |
.B "find previous button" |
| 221 |
Find the previous occurrence of the search string. |
| 222 |
.TP |
| 223 |
.B "find settings button" |
| 224 |
Display the current find settings: case insensitive, case sensitive, |
| 225 |
smart case (case sensitive only if the search string contains |
| 226 |
uppercase characters), find whole words. |
| 227 |
.PP |
| 228 |
.SS Menu bar |
| 229 |
The menu bar is above the toolbar. The menu items should be |
| 230 |
self-explanatory. |
| 231 |
.PP |
| 232 |
.SS Tab list |
| 233 |
The tab list is on the left, just below the toolbar. It lists all |
| 234 |
open tabs. |
| 235 |
.PP |
| 236 |
.SS Outline/layers/attachments pane |
| 237 |
This pane is on the left, below the tab list. The popup allows you to |
| 238 |
select from outline, layers, or attachments. |
| 239 |
.PP |
| 240 |
The outline is a tree-like structure of bookmarks that allows moving |
| 241 |
within the PDF file. Not all PDF files have outlines. |
| 242 |
.PP |
| 243 |
Layers (a.k.a. optional content) allow parts of the PDF content to be |
| 244 |
shown or hidden. Not all PDF files have layers. |
| 245 |
.PP |
| 246 |
Attachments are other files embedded within the PDF file. There is |
| 247 |
a 'save' button for each attached file. Not all PDF files have |
| 248 |
attachments. |
| 249 |
.PP |
| 250 |
.SS Text selection |
| 251 |
In block selection mode, dragging the mouse with the left button held |
| 252 |
down will highlight an arbitrary rectangle. Shift-clicking will |
| 253 |
extend the selection. |
| 254 |
.PP |
| 255 |
In linear selection mode, dragging with the left button will highlight |
| 256 |
text in reading order. Double-clicking or triple-clicking will select |
| 257 |
a word or a line, respectively. Shift-clicking will extend the |
| 258 |
selection. |
| 259 |
.PP |
| 260 |
Selected text can be copied to the clipboard (with the edit/copy menu |
| 261 |
item). On X11, selected text will be available in the X selection |
| 262 |
buffer. |
| 263 |
.PP |
| 264 |
.SS Links |
| 265 |
When the mouse is over a hyperlink, the link target will be shown in a |
| 266 |
popup near the bottom of the window. |
| 267 |
.PP |
| 268 |
Clicking on a hyperlink will jump to the link's destination. A link |
| 269 |
to another PDF document will make xpdf load that document. A |
| 270 |
\'launch' link to an executable program will display a dialog, and if |
| 271 |
you click \'ok', execute the program. URL links are opened in a |
| 272 |
system-dependent way. (On UNIX, Qt uses the $BROWSER environment |
| 273 |
variable.) |
| 274 |
.PP |
| 275 |
.SS Mouse bindings |
| 276 |
The left mouse button is used to select text (see above). |
| 277 |
.PP |
| 278 |
Clicking on a link with the middle button opens the link in a new tab. |
| 279 |
.PP |
| 280 |
Dragging the mouse with the middle button held down pans the window. |
| 281 |
.PP |
| 282 |
The right mouse button opens a popup menu (see |
| 283 |
.BR popupMenuCmd " in " xpdfrc (5)). |
| 284 |
.PP |
| 285 |
.SS Key bindings |
| 286 |
This section lists the default key bindings. Bindings can be changed |
| 287 |
using the config file (see |
| 288 |
.BR xpdfrc (5)). |
| 289 |
.TP |
| 290 |
.B control-o |
| 291 |
Open a new PDF file via a file requester. |
| 292 |
.TP |
| 293 |
.B control-r |
| 294 |
Reload the current PDF file. Note that Xpdf will reload the file |
| 295 |
automatically (on a page change or redraw) if it has changed since it |
| 296 |
was last loaded. |
| 297 |
.TP |
| 298 |
.B control-f |
| 299 |
Find a text string. This sets keyboard focus to the \'find' box. |
| 300 |
.TP |
| 301 |
.B control-G |
| 302 |
Find next occurrence. |
| 303 |
.TP |
| 304 |
.B control-C |
| 305 |
Copy selected text to the clipboard. |
| 306 |
.TP |
| 307 |
.B control-P |
| 308 |
Print. |
| 309 |
.TP |
| 310 |
.BR control-0 " (control-zero)" |
| 311 |
Set the zoom factor to 125%. |
| 312 |
.TP |
| 313 |
.BR control-+ " (control-plus)" |
| 314 |
Zoom in (increment the zoom factor by 1). |
| 315 |
.TP |
| 316 |
.BR control-- " (control-minus)" |
| 317 |
Zoom out (decrement the zoom factor by 1). |
| 318 |
.TP |
| 319 |
.B control-s |
| 320 |
Save PDF via a file requester. |
| 321 |
.TP |
| 322 |
.B control-t |
| 323 |
Open a new tab. |
| 324 |
.TP |
| 325 |
.B control-n |
| 326 |
Open a new window. |
| 327 |
.TP |
| 328 |
.B control-w |
| 329 |
Close the current tab. Closes the window if this was the last open |
| 330 |
tab. Quits the application if this was the last open window. |
| 331 |
.TP |
| 332 |
.B control-l |
| 333 |
Toggle between full-screen and window modes. |
| 334 |
.TP |
| 335 |
.B control-q |
| 336 |
Quit. |
| 337 |
.TP |
| 338 |
.B control-<tab> |
| 339 |
Next tab. |
| 340 |
.TP |
| 341 |
.B control-shift-<tab> |
| 342 |
Previous tab. |
| 343 |
.TP |
| 344 |
.B control-? |
| 345 |
Help. |
| 346 |
.TP |
| 347 |
.B alt-<left-arrow> |
| 348 |
Go backward along the history path. |
| 349 |
.TP |
| 350 |
.B alt-<right-arrow> |
| 351 |
Go forward along the history path. |
| 352 |
.TP |
| 353 |
.B home |
| 354 |
Go to the top left of current page. |
| 355 |
.TP |
| 356 |
.B control-<home> |
| 357 |
Go to the first page. |
| 358 |
.TP |
| 359 |
.B end |
| 360 |
Go to the bottom right of current page. |
| 361 |
.TP |
| 362 |
.B control-<end> |
| 363 |
Go to the last page. |
| 364 |
.TP |
| 365 |
.BR <space> " or " <PageDown> |
| 366 |
Scroll down on the current page; if already at bottom, move to next |
| 367 |
page. |
| 368 |
.TP |
| 369 |
.BR control-<PageDown> " or " control-<down-arrow> |
| 370 |
Go to the next page. If <ScrollLock> is active, this maintains the |
| 371 |
relative position on the page. |
| 372 |
.TP |
| 373 |
.B <PageUp> |
| 374 |
Scroll up on the current page; if already at top, move to previous |
| 375 |
page. |
| 376 |
.TP |
| 377 |
.BR control-<PageUp> " or " control-<up-arrow> |
| 378 |
Go to the previous page. If <ScrollLock> is active, this maintains |
| 379 |
the relative position on the page. |
| 380 |
.TP |
| 381 |
.B <esc> |
| 382 |
Exit full-screen mode. |
| 383 |
.TP |
| 384 |
.B arrows |
| 385 |
Scroll the current page. |
| 386 |
.TP |
| 387 |
.B g |
| 388 |
Set keyboard focus to the page number entry box. |
| 389 |
.TP |
| 390 |
.B z |
| 391 |
Set the zoom factor to \'page' (fit page to window). |
| 392 |
.TP |
| 393 |
.B w |
| 394 |
Set the zoom factor to \'width' (fit page width to window). |
| 395 |
.SH Full-screen mode |
| 396 |
Xpdf can be placed into full-screen mode via the |
| 397 |
.B \-fullscreen |
| 398 |
command line option, the \'full screen' menu item, or a binding to the |
| 399 |
.B fullScreenMode |
| 400 |
or |
| 401 |
.B toggleFullScreenMode |
| 402 |
command. |
| 403 |
.PP |
| 404 |
Entering full-screen mode automatically switches to single-page view |
| 405 |
mode and to the fit-page zoom factor. |
| 406 |
.PP |
| 407 |
Full-screen mode can be exited via the default <esc> key binding, |
| 408 |
or via a binding to the |
| 409 |
.B windowMode |
| 410 |
or |
| 411 |
.BR toggleFullScreenMode command . |
| 412 |
.SH COMMANDS |
| 413 |
Xpdf's key and mouse bindings are user-configurable, using the bind |
| 414 |
and unbind commands in the config file (see |
| 415 |
.BR xpdfrc (5)). |
| 416 |
The bind command allows you to bind a key or mouse button to a |
| 417 |
sequence of one or more commands. |
| 418 |
.PP |
| 419 |
In commands that take arguments (inside parentheses), special |
| 420 |
characters (namely '(', ')', ',', and '\\x01') can be escaped by |
| 421 |
preceding them with a '\\x01' character. This is mostly useful in |
| 422 |
things like scripts that need to be able to open arbitrary PDF files, |
| 423 |
using the \'openFile' command. |
| 424 |
.PP |
| 425 |
The following commands are supported: |
| 426 |
.TP |
| 427 |
.B about |
| 428 |
Open the \'about' dialog. |
| 429 |
.TP |
| 430 |
.B blockSelectMode |
| 431 |
Set block selection mode. In this mode, the selection is a simple |
| 432 |
rectangle. Any part of the page can be selected, regardless of the |
| 433 |
content on the page. |
| 434 |
.TP |
| 435 |
.BI checkOpenFile( file ) |
| 436 |
Check that |
| 437 |
.I file |
| 438 |
is open in the current tab, and open it if not. |
| 439 |
.TP |
| 440 |
.BI checkOpenFileAtDest( file, dest ) |
| 441 |
Check that |
| 442 |
.I file |
| 443 |
is open in the current tab, and open it if not. In either case go to |
| 444 |
the specified named destination. |
| 445 |
.TP |
| 446 |
.BI checkOpenFileAtPage( file, page ) |
| 447 |
Check that |
| 448 |
.I file |
| 449 |
is open in the current tab, and open it if not. In either case go to |
| 450 |
the specified page. |
| 451 |
.TP |
| 452 |
.B closeSidebar |
| 453 |
Close the sidebar. |
| 454 |
.TP |
| 455 |
.B closeSidebarMoveResizeWin |
| 456 |
Close the sidebar, resizing the window so that the document size |
| 457 |
doesn't change, and moving the window so that the document stays in |
| 458 |
the same place on the screen. |
| 459 |
.TP |
| 460 |
.B closeSidebarResizeWin |
| 461 |
Close the sidebar, resizing the window so that the document size |
| 462 |
doesn't change. |
| 463 |
.TP |
| 464 |
.B closeTabOrQuit |
| 465 |
Close the tab. If this was the last open tab, close the window. If |
| 466 |
this was the last window open, quit. |
| 467 |
.TP |
| 468 |
.B closeWindowOrQuit |
| 469 |
Close the window. If this was the last open window, quit. |
| 470 |
.TP |
| 471 |
.B continuousMode |
| 472 |
Switch to continuous view mode. |
| 473 |
.TP |
| 474 |
.B copy |
| 475 |
Copy selected text to the clipboard. |
| 476 |
.TP |
| 477 |
.B copyLinkTarget |
| 478 |
Copy the target of the link under the mouse cursor to the clipboard. |
| 479 |
.TP |
| 480 |
.B endPan |
| 481 |
End a pan operation. |
| 482 |
.TP |
| 483 |
.B endSelection |
| 484 |
End a selection. |
| 485 |
.TP |
| 486 |
.BI expandSidebar( n ) |
| 487 |
Expand the sidebar by |
| 488 |
.I n |
| 489 |
pixels. Opens the sidebar if it is currently closed. |
| 490 |
.TP |
| 491 |
.B find |
| 492 |
Set keyboard focus to the \'find' box. |
| 493 |
.TP |
| 494 |
.B findFirst |
| 495 |
Find the first occurrence of the search string. |
| 496 |
.TP |
| 497 |
.B findNext |
| 498 |
Find the next occurrence of the search string. |
| 499 |
.TP |
| 500 |
.B findPrevious |
| 501 |
Find the previous occurrence of the search string. |
| 502 |
.TP |
| 503 |
.B focusToDocWin |
| 504 |
Set keyboard focus to the main document window. |
| 505 |
.TP |
| 506 |
.B focusToPageNum |
| 507 |
Set keyboard focus to the page number text box. |
| 508 |
.TP |
| 509 |
.B followLink |
| 510 |
Follow a hyperlink (does nothing if the mouse is not over a link). |
| 511 |
.TP |
| 512 |
.B followLinkInNewTab |
| 513 |
Follow a hyperlink, opening PDF files in a new tab (does nothing if |
| 514 |
the mouse is not over a link). For links to non-PDF files, this |
| 515 |
command is identical to followLink. |
| 516 |
.TP |
| 517 |
.B followLinkInNewTabNoSel |
| 518 |
Same as followLinkInNewTab, but does nothing if there is a non-empty |
| 519 |
selection. (This is useful as a mouse button binding.) |
| 520 |
.TP |
| 521 |
.B followLinkInNewWin |
| 522 |
Follow a hyperlink, opening PDF files in a new window (does nothing if |
| 523 |
the mouse is not over a link). For links to non-PDF files, this |
| 524 |
command is identical to followLink. |
| 525 |
.TP |
| 526 |
.B followLinkInNewWinNoSel |
| 527 |
Same as followLinkInNewWin, but does nothing if there is a non-empty |
| 528 |
selection. (This is useful as a mouse button binding.) |
| 529 |
.TP |
| 530 |
.B followLinkNoSel |
| 531 |
Same as followLink, but does nothing if there is a non-empty selection. |
| 532 |
(This is useful as a mouse button binding.) |
| 533 |
.TP |
| 534 |
.B fullScreenMode |
| 535 |
Go to full-screen mode. |
| 536 |
.TP |
| 537 |
.B goBackward |
| 538 |
Move backward along the history path. |
| 539 |
.TP |
| 540 |
.B goForward |
| 541 |
Move forward along the history path. |
| 542 |
.TP |
| 543 |
.BI gotoDest( dest ) |
| 544 |
Go to a named destination. |
| 545 |
.TP |
| 546 |
.B gotoLastPage |
| 547 |
Go to the last page in the PDF file. |
| 548 |
.TP |
| 549 |
.BI gotoPage( page ) |
| 550 |
Go to the specified page. |
| 551 |
.TP |
| 552 |
.BI help |
| 553 |
Open the help URL. |
| 554 |
.TP |
| 555 |
.B hideMenuBar |
| 556 |
Hide the menu bar. |
| 557 |
.TP |
| 558 |
.B hideToolbar |
| 559 |
Hide the toolbar. |
| 560 |
.TP |
| 561 |
.B horizontalContinuousMode |
| 562 |
Switch to horizontal continuous view mode. |
| 563 |
.TP |
| 564 |
.B linearSelectMode |
| 565 |
Set linear selection mode. In this mode, the selection follows text. |
| 566 |
Non-text regions cannot be selected. |
| 567 |
.TP |
| 568 |
.B loadSession |
| 569 |
Load the session from the session save file. The path for the session file is specified with the sessionFile setting (see |
| 570 |
.BR xpdfrc (5)). |
| 571 |
.TP |
| 572 |
.BI loadTabState |
| 573 |
Load the tab state file (which was written via the saveTabState |
| 574 |
command), and restore the tabs listed in that file. The path for the |
| 575 |
tab state file is specified with the tabStateFile setting (see |
| 576 |
.BR xpdfrc (5)). |
| 577 |
.TP |
| 578 |
.B newTab |
| 579 |
Open an empty new tab. |
| 580 |
.TP |
| 581 |
.B newWindow |
| 582 |
Open an empty new window. |
| 583 |
.TP |
| 584 |
.B nextPage |
| 585 |
Go to the next page. |
| 586 |
.TP |
| 587 |
.B nextPageNoScroll |
| 588 |
Go to the next page, with the current relative scroll position. |
| 589 |
.TP |
| 590 |
.B nextTab |
| 591 |
Switch to the next tab. |
| 592 |
.TP |
| 593 |
.B normalVideoMode |
| 594 |
Switch to normal video mode (the opposite of reverse video mode). |
| 595 |
.TP |
| 596 |
.B open |
| 597 |
Open a PDF file in the current tab, using the open dialog. |
| 598 |
.TP |
| 599 |
.B openErrorWindow |
| 600 |
Open the error window. |
| 601 |
.TP |
| 602 |
.BI openFile( file ) |
| 603 |
Open the specified file in the current tab. |
| 604 |
.TP |
| 605 |
.BI openFile2( file, page, dest, passwd, location ) |
| 606 |
Open the specified file. If |
| 607 |
.I dest |
| 608 |
is not empty, go to the specified named destination. Else, if |
| 609 |
.I page |
| 610 |
is not empty, go to the specified page number. If |
| 611 |
.I password |
| 612 |
is not empty, it is used as the PDF password. If |
| 613 |
.I location |
| 614 |
is "win", open the file in a new window; if it is "tab", open in a new |
| 615 |
tab; if it is "check", open in the current tab, but only if the |
| 616 |
specified PDF file isn't already open; else open in the current tab. |
| 617 |
Any/all of the arguments, other than |
| 618 |
.IR file , |
| 619 |
can be empty strings. For example: |
| 620 |
.nf |
| 621 |
openFile2(test.pdf,7,,,tab) |
| 622 |
.fi |
| 623 |
.TP |
| 624 |
.BI openFileAtDest( file, dest ) |
| 625 |
Open the specified file in the current tab at the specified named |
| 626 |
destination. |
| 627 |
.TP |
| 628 |
.BI openFileAtDestIn( file, dest, location ) |
| 629 |
Open the specified file at the specified named destination. Location |
| 630 |
must be "win" for a new window or "tab" for a new tab. |
| 631 |
.TP |
| 632 |
.BI openFileAtPage( file, page ) |
| 633 |
Open the specified file in the current tab at the specified page. |
| 634 |
.TP |
| 635 |
.BI openFileAtPageIn( file, page, location ) |
| 636 |
Open the specified file at the specified page. Location must be "win" |
| 637 |
for a new window or "tab" for a new tab. |
| 638 |
.TP |
| 639 |
.BI openFileIn( file, location ) |
| 640 |
Open the specified file. Location must be "win" for a new window or |
| 641 |
"tab" for a new tab. |
| 642 |
.TP |
| 643 |
.BI openIn( location ) |
| 644 |
Open a PDF file, using the open dialog. Location must be "win" for a |
| 645 |
new window or "tab" for a new tab. |
| 646 |
.TP |
| 647 |
.B openSidebar |
| 648 |
Open the sidebar. |
| 649 |
.TP |
| 650 |
.B openSidebarMoveResizeWin |
| 651 |
Open the sidebar, resizing the window so that the document size |
| 652 |
doesn't change, and moving the window so that the document stays in |
| 653 |
the same place on the screen. |
| 654 |
.TP |
| 655 |
.B openSidebarResizeWin |
| 656 |
Open the sidebar, resizing the window so that the document size |
| 657 |
doesn't change. |
| 658 |
.TP |
| 659 |
.B pageDown |
| 660 |
Scroll down by one screenful. |
| 661 |
.TP |
| 662 |
.B pageUp |
| 663 |
Scroll up by one screenful. |
| 664 |
.TP |
| 665 |
.B postPopupMenu |
| 666 |
Display the popup menu. |
| 667 |
.TP |
| 668 |
.B prevPage |
| 669 |
Go to the previous page. |
| 670 |
.TP |
| 671 |
.B prevPageNoScroll |
| 672 |
Go to the previous page, with the current relative scroll position. |
| 673 |
.TP |
| 674 |
.B prevTab |
| 675 |
Switch to the previous tab. |
| 676 |
.TP |
| 677 |
.B print |
| 678 |
Open the \'print' dialog. |
| 679 |
.TP |
| 680 |
.B quit |
| 681 |
Quit from xpdf. |
| 682 |
.TP |
| 683 |
.B raise |
| 684 |
Bring the xpdf window to the front. |
| 685 |
.TP |
| 686 |
.B reload |
| 687 |
Reload the current PDF file. |
| 688 |
.TP |
| 689 |
.B reverseVideoMode |
| 690 |
Switch to reverse video mode. |
| 691 |
.TP |
| 692 |
.B rotateCCW |
| 693 |
Rotate the page 90 degrees counterclockwise. |
| 694 |
.TP |
| 695 |
.B rotateCW |
| 696 |
Rotate the page 90 degrees clockwise. |
| 697 |
.TP |
| 698 |
.BI run( external-command-string ) |
| 699 |
Run an external command. The following escapes are allowed in the |
| 700 |
command string: |
| 701 |
.nf |
| 702 |
|
| 703 |
%f => PDF file name (or an empty string if no |
| 704 |
file is open) |
| 705 |
%b => PDF file base name, i.e., file name minus |
| 706 |
the extension (or an empty string if no |
| 707 |
file is open) |
| 708 |
%u => link URL (or an empty string if not over |
| 709 |
a URL link) |
| 710 |
%p => current page number (or an empty string if |
| 711 |
no file is open) |
| 712 |
%x => selection upper-left x coordinate |
| 713 |
(or 0 if there is no selection) |
| 714 |
%y => selection upper-left y coordinate |
| 715 |
(or 0 if there is no selection) |
| 716 |
%X => selection lower-right x coordinate |
| 717 |
(or 0 if there is no selection) |
| 718 |
%Y => selection lower-right y coordinate |
| 719 |
(or 0 if there is no selection) |
| 720 |
%t => selected text (limited to 500 characters) |
| 721 |
%i => page containing the mouse pointer |
| 722 |
%j => x coordinate of the mouse pointer |
| 723 |
%k => y coordinate of the mouse pointer |
| 724 |
%% => % |
| 725 |
|
| 726 |
.fi |
| 727 |
The external command string will often contain spaces, so the whole |
| 728 |
command must be quoted in the xpdfrc file: |
| 729 |
.nf |
| 730 |
|
| 731 |
bind x "run(ls -l)" |
| 732 |
|
| 733 |
.fi |
| 734 |
The command string may not be run through a shell. It is recommended |
| 735 |
to keep the command simple, so that it doesn't depend on specific |
| 736 |
shell functionality. For complex things, you can have the command |
| 737 |
string run a shell script. |
| 738 |
.TP |
| 739 |
.B saveAs |
| 740 |
Save PDF via a file requester. |
| 741 |
.TP |
| 742 |
.B saveImage |
| 743 |
Open the \'save image' dialog. |
| 744 |
.TP |
| 745 |
.B saveSession |
| 746 |
Save the current session, consisting of all open windows and tabs, to |
| 747 |
the session save file. This file can be loaded later with the |
| 748 |
loadSession command. The path for the session file is specified with |
| 749 |
the sessionFile setting (see |
| 750 |
.BR xpdfrc (5)). |
| 751 |
.TP |
| 752 |
.BI saveTabState |
| 753 |
Save a list of all tabs open in this window to the tab state file. |
| 754 |
For each tab, this writes the PDF file name and page number (on |
| 755 |
separate lines). This file can be loaded later with the loadTabState |
| 756 |
command. The path for the tab state file is specified with the |
| 757 |
tabStateFile setting (see |
| 758 |
.BR xpdfrc (5)). |
| 759 |
.TP |
| 760 |
.BI scrollDown( n ) |
| 761 |
Scroll down by |
| 762 |
.I n |
| 763 |
pixels. |
| 764 |
.TP |
| 765 |
.BI scrollDownNextPage( n ) |
| 766 |
Scroll down by |
| 767 |
.I n |
| 768 |
pixels, moving to the next page if appropriate. |
| 769 |
.TP |
| 770 |
.BI scrollLeft( n ) |
| 771 |
Scroll left by |
| 772 |
.I n |
| 773 |
pixels. |
| 774 |
.TP |
| 775 |
.BI scrollOutlineDown( n ) |
| 776 |
Scroll the outline down by |
| 777 |
.I n |
| 778 |
increments. |
| 779 |
.TP |
| 780 |
.BI scrollOutlineUp( n ) |
| 781 |
Scroll the outline up by |
| 782 |
.I n |
| 783 |
increments. |
| 784 |
.TP |
| 785 |
.BI scrollRight( n ) |
| 786 |
Scroll right by |
| 787 |
.I n |
| 788 |
pixels. |
| 789 |
.TP |
| 790 |
.B scrollToBottomEdge |
| 791 |
Scroll to the bottom edge of the last displayed page, with no |
| 792 |
horizontal movement. |
| 793 |
.TP |
| 794 |
.B scrollToBottomRight |
| 795 |
Scroll to the bottom-right corner of the last displayed page. |
| 796 |
.TP |
| 797 |
.B scrollToLeftEdge |
| 798 |
Scroll to the left edge of the current page, with no vertical |
| 799 |
movement. |
| 800 |
.TP |
| 801 |
.B scrollToRightEdge |
| 802 |
Scroll to the right edge of the current page, with no vertical |
| 803 |
movement. |
| 804 |
.TP |
| 805 |
.B scrollToTopEdge |
| 806 |
Scroll to the top edge of the first displayed page, with no horizontal |
| 807 |
movement. |
| 808 |
.TP |
| 809 |
.B scrollToTopLeft |
| 810 |
Scroll to the top-left corner of the first displayed page. |
| 811 |
.TP |
| 812 |
.BI scrollUp( n ) |
| 813 |
Scroll up by |
| 814 |
.I n |
| 815 |
pixels. |
| 816 |
.TP |
| 817 |
.BI scrollUpPrevPage( n ) |
| 818 |
Scroll up by |
| 819 |
.I n |
| 820 |
pixels, moving to the previous page if appropriate. |
| 821 |
.TP |
| 822 |
.B selectLine |
| 823 |
Set the selection to the line at the current mouse position. |
| 824 |
.TP |
| 825 |
.B selectWord |
| 826 |
Set the selection to the word at the current mouse position. |
| 827 |
.TP |
| 828 |
.BI setSelection( pg , ulx , uly , lrx , lry ) |
| 829 |
Set the selection to the specified coordinates on the specified page. |
| 830 |
.TP |
| 831 |
.B showAttachmentsPane |
| 832 |
Shows the attachments in the outline/layers/attachments pane. |
| 833 |
.TP |
| 834 |
.B showDocumentInfo |
| 835 |
Open the document information dialog. |
| 836 |
.TP |
| 837 |
.B showKeyBindings |
| 838 |
Open the key bindings dialog. |
| 839 |
.TP |
| 840 |
.B showLayersPane |
| 841 |
Shows the layers in the outline/layers/attachments pane. |
| 842 |
.TP |
| 843 |
.B showMenuBar |
| 844 |
Show the menu bar. |
| 845 |
.TP |
| 846 |
.B showOutlinePane |
| 847 |
Shows the outline in the outline/layers/attachments pane. |
| 848 |
.TP |
| 849 |
.B showToolbar |
| 850 |
Show the toolbar. |
| 851 |
.TP |
| 852 |
.BI shrinkSidebar( n ) |
| 853 |
Shrink the sidebar by |
| 854 |
.I n |
| 855 |
pixels. Closes the sidebar if shrinking it would go below the minimum |
| 856 |
allowed side. |
| 857 |
.TP |
| 858 |
.B sideBySideContinuousMode |
| 859 |
Switch to side-by-side continuous view mode. |
| 860 |
.TP |
| 861 |
.B sideBySideSingleMode |
| 862 |
Switch to side-by-side two-page view mode. |
| 863 |
.TP |
| 864 |
.B singlePageMode |
| 865 |
Switch to single-page view mode. |
| 866 |
.TP |
| 867 |
.B startExtendedSelection |
| 868 |
Extend the selection to the current mouse position, and continue |
| 869 |
extending as the mouse moves. |
| 870 |
.TP |
| 871 |
.B startPan |
| 872 |
Start a pan operation at the current mouse position, which will scroll |
| 873 |
the document as the mouse moves. |
| 874 |
.TP |
| 875 |
.B startSelection |
| 876 |
Start a selection at the current mouse position, which will be |
| 877 |
extended as the mouse moves. |
| 878 |
.TP |
| 879 |
.B toggleContinuousMode |
| 880 |
Toggle between continuous and single page view modes. |
| 881 |
.TP |
| 882 |
.B toggleFullScreenMode |
| 883 |
Toggle between full-screen and window modes. |
| 884 |
.TP |
| 885 |
.B toggleMenuBar |
| 886 |
Toggle the menu bar between shown and hidden. |
| 887 |
.TP |
| 888 |
.B toggleReverseVideoMode |
| 889 |
Toggle between reverse and normal video modes. |
| 890 |
.TP |
| 891 |
.B toggleSelectMode |
| 892 |
Toggle between block and linear selection mode. |
| 893 |
.TP |
| 894 |
.B toggleSidebar |
| 895 |
Toggle the sidebar between open and closed. |
| 896 |
.TP |
| 897 |
.B toggleSidebarMoveResizeWin |
| 898 |
Toggle the sidebar between open and closed, resizing the window so |
| 899 |
that the document size doesn't change, and moving the window so that |
| 900 |
the document stays in the same place on the screen. |
| 901 |
.TP |
| 902 |
.B toggleSidebarResizeWin |
| 903 |
Toggle the sidebar between open and closed, resizing the window so |
| 904 |
that the document size doesn't change. |
| 905 |
.TP |
| 906 |
.B toggleToolbar |
| 907 |
Toggle the toolbar between shown and hidden. |
| 908 |
.TP |
| 909 |
.B viewPageLabels |
| 910 |
Show page labels (if the PDF file has them), rather than page numbers. |
| 911 |
.TP |
| 912 |
.B viewPageNumbers |
| 913 |
Show page numbers, rather than page labels. |
| 914 |
.TP |
| 915 |
.B windowMode |
| 916 |
Go to window (non-full-screen) mode. |
| 917 |
.TP |
| 918 |
.B zoomFitPage |
| 919 |
Set the zoom factor to fit-page. |
| 920 |
.TP |
| 921 |
.B zoomFitWidth |
| 922 |
Set the zoom factor to fit-width. |
| 923 |
.TP |
| 924 |
.B zoomIn |
| 925 |
Zoom in - go to the next higher zoom factor. |
| 926 |
.TP |
| 927 |
.B zoomOut |
| 928 |
Zoom out - go the next lower zoom factor. |
| 929 |
.TP |
| 930 |
.BI zoomPercent( z ) |
| 931 |
Set the zoom factor to |
| 932 |
.IR z %. |
| 933 |
.TP |
| 934 |
.B zoomToSelection |
| 935 |
Zoom to the current selection. |
| 936 |
.SH REMOTE SERVER MODE |
| 937 |
Starting xpdf with the "-remote" switch puts it into remote server |
| 938 |
mode. All remaining command line options are commands (see the |
| 939 |
COMMANDS section). Subsequent invocations of "xpdf -remote" with the |
| 940 |
same remote server name will send commands to the already-running |
| 941 |
instance of xpdf. The "checkOpenFile" commands are useful here for |
| 942 |
things like changing pages. |
| 943 |
For example: |
| 944 |
.PP |
| 945 |
.RS |
| 946 |
# Start up xpdf, and open something.pdf. |
| 947 |
xpdf -remote foo 'openFile(something.pdf)' |
| 948 |
|
| 949 |
# Switch to page 7 in the already-open something.pdf. If the user |
| 950 |
# has closed xpdf in the meantime, this will restart it and reopen |
| 951 |
# the file. |
| 952 |
xpdf -remote foo 'checkOpenFileAtPage(something.pdf, 7)' |
| 953 |
|
| 954 |
# Pass two commands to the remote instance: (1) open something.pdf |
| 955 |
# and then (2) raise the xpdf window. |
| 956 |
xpdf -remote foo 'openFile(something.pdf)' raise |
| 957 |
.RE |
| 958 |
.PP |
| 959 |
.SH EXIT CODES |
| 960 |
The Xpdf tools use the following exit codes: |
| 961 |
.TP |
| 962 |
0 |
| 963 |
No error. |
| 964 |
.TP |
| 965 |
1 |
| 966 |
Error opening a PDF file. |
| 967 |
.TP |
| 968 |
2 |
| 969 |
Error opening an output file. |
| 970 |
.TP |
| 971 |
3 |
| 972 |
Error related to PDF permissions. |
| 973 |
.TP |
| 974 |
99 |
| 975 |
Other error. |
| 976 |
.SH AUTHOR |
| 977 |
The xpdf software and documentation are copyright 1996-2025 Glyph & |
| 978 |
Cog, LLC. |
| 979 |
.SH "SEE ALSO" |
| 980 |
.BR pdftops (1), |
| 981 |
.BR pdftotext (1), |
| 982 |
.BR pdftohtml (1), |
| 983 |
.BR pdfinfo (1), |
| 984 |
.BR pdffonts (1), |
| 985 |
.BR pdfdetach (1), |
| 986 |
.BR pdftoppm (1), |
| 987 |
.BR pdftopng (1), |
| 988 |
.BR pdfimages (1), |
| 989 |
.BR xpdfrc (5) |
| 990 |
.br |
| 991 |
.B http://www.xpdfreader.com/ |