Bringing apdf from vendor into main branch.
[AROS-Contrib.git] / apdf / doc / xpdf.1
blob1591d25ee947f362006bea49288b189785c6ae99
1 .\" Copyright 1996-2005 Glyph & Cog, LLC
2 .TH xpdf 1 "17 August 2005"
3 .SH NAME
4 xpdf \- Portable Document Format (PDF) file viewer for X (version 3.01)
5 .SH SYNOPSIS
6 .B xpdf
7 [options]
8 .RI [ PDF-file
9 .RI [ page " | +" dest ]]
10 .SH DESCRIPTION
11 .B Xpdf
12 is a viewer for Portable Document Format (PDF) files.  (These are also
13 sometimes also called \'Acrobat' files, from the name of Adobe's PDF
14 software.)  Xpdf runs under the X Window System on UNIX, VMS, and
15 OS/2.
16 .PP
17 To run xpdf, simply type:
18 .PP
19 .RS
20 xpdf file.pdf
21 .RE
22 .PP
23 where
24 .I file.pdf
25 is your PDF file.  The file name can be followed by a number
26 specifying the page which should be displayed first, e.g.:
27 .PP
28 .RS
29 xpdf file.pdf 18
30 .RE
31 .PP
32 You can also give a named destination, prefixed with \'+' in place of
33 the page number.  (This is only useful with PDF files that provide
34 named destination targets.)
35 .PP
36 You can also start xpdf without opening any files:
37 .PP
38 .RS
39 xpdf
40 .RE
41 .SH CONFIGURATION FILE
42 Xpdf reads a configuration file at startup.  It first tries to find
43 the user's private config file, ~/.xpdfrc.  If that doesn't exist, it
44 looks for a system-wide config file, typically /usr/local/etc/xpdfrc
45 (but this location can be changed when xpdf is built).  See the
46 .BR xpdfrc (5)
47 man page for details.
48 .SH OPTIONS
49 Many of the following options can be set with configuration file
50 commands or X resources.  These are listed in square brackets with the
51 description of the corresponding command line option.
52 .TP
53 .BI \-g " geometry"
54 Set the initial window geometry.
55 .RB ( \-geometry
56 is equivalent.)
57 .RB "[X resource: " xpdf.geometry ]
58 .TP
59 .BI \-title " title"
60 Set the window title.  By default, the title will be "xpdf: foo.pdf".
61 .RB "[X resource: " xpdf.title ]
62 .TP
63 .B \-cmap
64 Install a private colormap.  This is ignored on TrueColor visuals.
65 .RB "[X resource: " xpdf.installCmap ]
66 .TP
67 .BI \-rgb " number"
68 Set the size of largest RGB cube xpdf will try to allocate.  The
69 default is 5 (for a 5x5x5 cube); set to a smaller number to conserve
70 color table entries.  This is ignored with private colormaps and on
71 TrueColor visuals.
72 .RB "[X resource: " xpdf.rgbCubeSize ]
73 .TP
74 .B \-rv
75 Set reverse video mode.  This reverses the colors of everything except
76 images.  It may not always produce great results for PDF files which
77 do weird things with color.  This also causes the paper color to
78 default to black.
79 .RB "[X resource: " xpdf.reverseVideo ]
80 .TP
81 .BI \-papercolor " color"
82 Set the "paper color", i.e., the background of the page display.  This
83 will not work too well with PDF files that do things like filling in
84 white behind the text.
85 .RB "[X resource: " xpdf.paperColor ]
86 .TP
87 .BI \-mattecolor " color"
88 Set the matte color, i.e., the color used for background outside the
89 actual page area.
90 .RB "[X resource: " xpdf.matteColor ]
91 .TP
92 .BI \-z " zoom"
93 Set the initial zoom factor.  A number specifies a zoom percentage,
94 where 100 means 72 dpi.You may also specify \'page', to fit the page
95 to the window size, or \'width', to fit the page width to the window
96 width.
97 .RB "[config file: " initialZoom "; or X resource: " xpdf.initialZoom ]
98 .TP
99 .B \-cont
100 Start in continuous view mode, i.e., with one vertical scroll bar for
101 the whole document.
102 .RB "[config file: " continuousView ]
104 .BI \-t1lib " yes | no"
105 Enable or disable t1lib (a Type 1 font rasterizer).  This defaults to
106 "yes".
107 .RB "[config file: " enableT1lib ]
109 .BI \-freetype " yes | no"
110 Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
111 This defaults to "yes".
112 .RB "[config file: " enableFreeType ]
114 .BI \-aa " yes | no"
115 Enable or disable font anti-aliasing.  This defaults to "yes".
116 .RB "[config file: " antialias ]
118 .BI \-ps " PS-file"
119 Set the default file name for PostScript output (i.e., the name which
120 will appear in the print dialog).  This can also be of the form
121 \'|command' to pipe the PostScript through a command.
122 .RB "[config file: " psFile ]
124 .BI \-paper " size"
125 Set the paper size to one of "letter", "legal", "A4", or "A3".  This
126 can also be set to "match", which will set the paper size to match the
127 size specified in the PDF file.
128 .RB "[config file: " psPaperSize ]
130 .BI \-paperw " size"
131 Set the paper width, in points.
132 .RB "[config file: " psPaperSize ]
134 .BI \-paperh " size"
135 Set the paper height, in points.
136 .RB "[config file: " psPaperSize ]
138 .B \-level1
139 Generate Level 1 PostScript.  The resulting PostScript files will be
140 significantly larger (if they contain images), but will print on Level
141 1 printers.  This also converts all images to black and white.
142 .RB "[config file: " psLevel ]
144 .BI \-enc " encoding-name"
145 Sets the encoding to use for text output.  The
146 .I encoding\-name
147 must be defined with the unicodeMap command (see
148 .BR xpdfrc (5)).
149 This defaults to "Latin1" (which is a built-in encoding).
150 .RB "[config file: " textEncoding ]
152 .BI \-eol " unix | dos | mac"
153 Sets the end-of-line convention to use for text output.
154 .RB "[config file: " textEOL ]
156 .BI \-opw " password"
157 Specify the owner password for the PDF file.  Providing this will
158 bypass all security restrictions.
160 .BI \-upw " password"
161 Specify the user password for the PDF file.
163 .B \-fullscreen
164 Open xpdf in a full-screen mode, useful for presentations.  You may
165 also want to specify '-bg black' (or similar) with this.  (There is
166 currently no way to switch between window and full-screen modes on the
167 fly.)
169 .BI \-remote " name"
170 Start/contact xpdf remote server with specified name (see the
171 .B "REMOTE SERVER MODE"
172 section below).
174 .B \-reload
175 Reload xpdf remote server window (with -remote only).
177 .B \-raise
178 Raise xpdf remote server window (with -remote only).
180 .B \-quit
181 Kill xpdf remote server (with -remote only).
183 .B \-cmd
184 Print commands as they're executed (useful for debugging).
185 .RB "[config file: " printCommands ]
187 .B \-q
188 Don't print any messages or errors.
189 .RB "[config file: " errQuiet ]
191 .BI \-cfg " config-file"
192 Read
193 .I config-file
194 in place of ~/.xpdfrc or the system-wide config file.
196 .B \-v
197 Print copyright and version information.
199 .B \-h
200 Print usage information.
201 .RB ( \-help
203 .B \-\-help
204 are equivalent.)
206 Several other standard X options and resources will work as expected:
208 .BI \-display " display"
209 .RB "[X resource: " xpdf.display ]
211 .BI \-fg " color"
212 .RB ( \-foreground
213 is equivalent.)
214 .RB "[X resource: " xpdf*Foreground ]
216 .BI \-bg " color"
217 .RB ( \-background
218 is equivalent.)
219 .RB "[X resource: " xpdf*Background ]
221 .BI \-font " font"
222 .RB ( \-fn
223 is equivalent.)
224 .RB "[X resource: " xpdf*fontList ]
226 The color and font options only affect the user interface elements,
227 not the PDF display (the \'paper').
229 The following X resources do not have command line option equivalents:
231 .B xpdf.viKeys
232 Enables the \'h', \'l', \'k' and \'j' keys for left, right, up, and
233 down scrolling.
235 .B xpdf.toolTipEnable
236 Enables (if set to true) or disables (if set to false) the tool-tips
237 on the toolbar buttons.
238 .SH CONTROLS
239 .SS On-screen controls, at the bottom of the xpdf window
241 .B "left/right arrow buttons"
242 Move to the previous/next page.
244 .B "double left/right arrow buttons"
245 Move backward or forward by ten pages.
247 .B "dashed left/right arrow buttons"
248 Move backward or forward along the history path.
250 .B "\'Page' entry box"
251 Move to a specific page number.  Click in the box to activate it, type
252 the page number, then hit return.
254 .B "zoom popup menu"
255 Change the zoom factor (see the description of the -z option above).
257 .B "binoculars button"
258 Find a text string.
260 .B "print button"
261 Bring up a dialog for generating a PostScript file.  The dialog has
262 options to set the pages to be printed and the PostScript file name.
263 The file name can be \'-' for stdout or \'|command' to pipe the
264 PostScript through a command, e.g., \'|lpr'.
266 .B "\'?' button"
267 Bring up the \'about xpdf' window.
269 .B "link info"
270 The space between the \'?' and \'Quit' buttons is used to show the URL
271 or external file name when the mouse is over a link.
273 .B "\'Quit' button"
274 Quit xpdf.
276 .SS Menu
277 Pressing the right mouse button will post a popup menu with the
278 following commands:
280 .B "Open..."
281 Open a new PDF file via a file requester.
283 .B "Open in new window..."
284 Create a new window and open a new PDF file via a file requester.
286 .B "Reload"
287 Reload the current PDF file.  Note that Xpdf will reload the file
288 automatically (on a page change or redraw) if it has changed since it
289 was last loaded.
291 .B "Save as..."
292 Save the current file via a file requester.
294 .B "Continuous view"
295 Toggles between single page and continuous view modes.
297 .B "Rotate counterclockwise"
298 Rotate the page 90 degrees counterclockwise.
300 .B "Rotate clockwise"
301 Rotate the page 90 degrees clockwise.  The two rotate commands are
302 intended primarily for PDF files where the rotation isn't correctly
303 specified in the file.
305 .B "Close"
306 Close the current window.  If this is the only open window, the
307 document is closed, but the window is left open (i.e., this menu
308 command won't quit xpdf).
310 .B "Quit"
311 Quit xpdf.
313 .SS Outline
314 If the PDF contains an outline (a.k.a., bookmarks), there will be an
315 outline pane on the left side of the window.  The width of the outline
316 pane is adjustable with a vertical split bar via the knob near its
317 bottom end.
319 .SS Text selection
320 Dragging the mouse with the left button held down will highlight an
321 arbitrary rectangle.  Any text inside this rectangle will be copied to
322 the X selection buffer.
324 .SS Links
325 Clicking on a hyperlink will jump to the link's destination.  A link
326 to another PDF document will make xpdf load that document.  A
327 \'launch' link to an executable program will display a dialog, and if
328 you click \'ok', execute the program.  URL links call an external
329 command (see the
330 .B WEB BROWSERS
331 section below).
333 .SS Panning
334 Dragging the mouse with the middle button held down pans the window.
336 .SS Key bindings
338 .B o
339 Open a new PDF file via a file requester.
341 .B r
342 Reload the current PDF file.  Note that Xpdf will reload the file
343 automatically (on a page change or redraw) if it has changed since it
344 was last loaded.
346 .B control-L
347 Redraw the current page.
349 .B control-W
350 Close the current window.
352 .B f or control-F
353 Find a text string.
355 .B control-G
356 Find next occurrence.
358 .B control-P
359 Print.
361 .B n
362 Move to the next page.  Scrolls to the top of the page, unless scroll
363 lock is turned on.
365 .B p
366 Move to the previous page.  Scrolls to the top of the page, unless
367 scroll lock is turned on.
369 .BR <Space> " or " <PageDown> " or " <Next>
370 Scroll down on the current page; if already at bottom, move to next
371 page.
373 .BR <Backspace> " or " <Delete> " or " <PageUp> " or " <Previous>
374 Scroll up on the current page; if already at top, move to previous
375 page.
377 .B v
378 Move forward along the history path.
380 .B b
381 Move backward along the history path.
383 .B <Home>
384 Scroll to top of current page.
386 .B <End>
387 Scroll to bottom of current page.
389 .B control-<Home>
390 Scroll to first page of document.
392 .B control-<End>
393 Scroll to last page of document.
395 .B arrows
396 Scroll the current page.
398 .B g
399 Activate the page number text field ("goto page").
401 .B 0
402 Set the zoom factor to 125%.
404 .B +
405 Zoom in (increment the zoom factor by 1).
407 .B -
408 Zoom out (decrement the zoom factor by 1).
410 .B z
411 Set the zoom factor to 'page' (fit page to window).
413 .B w
414 Set the zoom factor to 'width' (fit page width to window).
416 .B q
417 Quit xpdf.
418 .SH "WEB BROWSERS"
419 If you want to run xpdf automatically from netscape or mosaic (and
420 probably other browsers) when you click on a link to a PDF file, you
421 need to edit (or create) the files
422 .I .mime.types
424 .I .mailcap
425 in your home directory.  In
426 .I .mime.types
427 add the line:
430 application/pdf pdf
434 .I .mailcap
435 add the lines:
438 # Use xpdf to view PDF files.
441 application/pdf; xpdf -q %s
444 Make sure that xpdf is on your executable search path.
446 When you click on a URL link in a PDF file, xpdf will execute the
447 command specified by the urlCommand config file option, replacing an
448 occurrence of \'%s' with the URL.  For example, to call netscape with
449 the URL, add this line to your config file:
452 urlCommand "netscape -remote 'openURL(%s)'"
454 .SH "REMOTE SERVER MODE"
455 Xpdf can be started in remote server mode by specifying a server name
456 (in addition to the file name and page number).  For example:
459 xpdf -remote myServer file.pdf
462 If there is currently no xpdf running in server mode with the name
463 \'myServer', a new xpdf window will be opened.  If another command:
466 xpdf -remote myServer another.pdf 9
469 is issued, a new copy of xpdf will not be started.  Instead, the first
470 xpdf (the server) will load
471 .I another.pdf
472 and display page nine.  If the file name is the same:
475 xpdf -remote myServer another.pdf 4
478 the xpdf server will simply display the specified page.
480 The -raise option tells the server to raise its window; it can be
481 specified with or without a file name and page number.
483 The -quit option tells the server to close its window and exit.
484 .SH EXIT CODES
485 The Xpdf tools use the following exit codes:
488 No error.
491 Error opening a PDF file.
494 Error opening an output file.
497 Error related to PDF permissions.
500 Other error.
501 .SH AUTHOR
502 The xpdf software and documentation are copyright 1996-2005 Glyph &
503 Cog, LLC.
504 .SH "SEE ALSO"
505 .BR pdftops (1),
506 .BR pdftotext (1),
507 .BR pdfinfo (1),
508 .BR pdffonts (1),
509 .BR pdftoppm (1),
510 .BR pdfimages (1),
511 .BR xpdfrc (5)
513 .B http://www.foolabs.com/xpdf/