1PDFOPEN(1) PDFOPEN(1)
2
3
4
6 pdfopen, pdfclose - open or close a PDF file viewer
7
9 pdfopen [ options ] [ --file ] file.pdf
10 pdfclose [ --file ] file.pdf
11
13 -h, --help, -?
14 output help and exit.
15
16 -v, --version, -V
17 output the version number and exit.
18
19 -p <n>, --page <n>
20 when starting the viewer, display page <n> of the document
21 (notes: not all viewers support this feature, and even in those
22 cases this option only has effect when the document is ini‐
23 tially loaded). This option is over-ridden by -g.
24
25 -g <named destination>, --goto <named destination>
26 when starting the viewer, display the page of the document con‐
27 taining the named destination (notes: not all viewers support
28 this feature, and even in those cases this option only has
29 effect when the document is initially loaded).
30
31 -r, --reset_focus
32 after sending commands to the PDF viewer, attempt to reset the
33 input focus to the window which had focus before the commands
34 were sent.
35
36 -viewer, --viewer <ar9|ar9-tab|ar8|ar7|ar5|xpdf|evince>
37 use (respectively) Adobe Reader 9 (in a new window), Adobe
38 Reader 9 (in a new tab of a running AR9, if any), Adobe Reader
39 8, Adobe Reader 7, Adobe Reader 5, xpdf or evince as the PDF
40 viewer program. Adobe Reader 9 (in a new window) is the
41 default.
42
44 At certain points of TeX document preparation, many people repeat a
45 "edit-compile-view" cycle. Since PDF viewers such as Adobe's Acrobat
46 Reader ("acroread") do not automatically refresh the display when the
47 PDF file changes, this cycle can be more cumbersome than desired. The
48 pdfopen program provides the ability to automate the reloading of the
49 PDF document when it is changed.
50
51 Note: there seems to be little need for pdfclose under GNU/Linux, since
52 (unlike the situation for MS windows) acroread does not lock the PDF
53 file, which would prevent pdftex (or a DVI to PDF converter) from cre‐
54 ating a new version of the PDF output file. However, pdfclose is pro‐
55 vided in case someone finds it useful.
56
58 pdfopen searches for an instance of the specified (or default) PDF
59 viewer displaying the specified PDF file. If there is already an
60 instance of the given viewer displaying the given file, the viewer is
61 instructed to reload the file. If no such instance is found, pdfopen
62 attempts to run the specified viewer on the specified document.
63
64 The default viewer is "acroread", which could start any one of a number
65 of versions of Acrobat Reader, depending on what is installed on your
66 system. However, the commands to reload the current document vary from
67 one version of acroread to another; consequently, if you are using a
68 version of acroread other than AR9, you should explicitly specify the
69 viewer program.
70
71 This version of pdfopen accepts the following viewer options:
72 ar9, ar9-tab, ar8, ar7, ar5, xpdf, and evince.
73 The difference between ar9 and ar9-tab is significant when there is no
74 instance of AR9 already displaying the requested document. In this
75 situation, while ar9 will request acroread to create a new instance of
76 acroread (and thus open a new window) by using the -openInNewInstance
77 argument, ar9-tab starts acroread without this argument; if there is
78 already an instance of acroread running, a new tab will be opened in an
79 existing window.
80
81 pdfclose searches for one of the above PDF viewers displaying the given
82 file and instructs the viewer to "close" the window. In most cases,
83 the PDF viewer continues to run, possibly now displaying just a blank
84 window. (This behaviour varies somewhat from one PDF viewer to
85 another.)
86
88 These programs have been tested on Slackware64 Version 14.1 and a few
89 other versions / distributions of GNU/Linux. The code is reasonably
90 generic and should work out of the box using most recent X11 implemen‐
91 tations. (Reports to the contrary are welcome, particularly if they
92 come with robust fixes.)
93
94 These programs are designed for X11-based systems. If you somehow find
95 compiled versions of these programs on a system using another window
96 system, they are very unlikely to be of any use to you.
97
98 Source and binaries of the programs can be downloaded from CTAN://sup‐
99 port/xpdfopen/ (e.g., http://mirror.ctan.org/support/xpdfopen).
100
102 If you use ar9-tab to reload the PDF document and the instance of
103 acroread with the given document is currently displaying some other
104 document, the command causes your document to be displayed, but not
105 reloaded.
106
107 pdfopen works by looking for a window with a name (window title) match‐
108 ing that expected for the given viewer and document. If for some rea‐
109 son your viewer's window name is not as expected, pdfopen may not work
110 for you.
111
112 With at least AR9 and some window managers, using pdfopen to reload the
113 document gives focus to the acroread window, even though the mouse cur‐
114 sor is not necessarily in that window. This can be annoying. The
115 -reset_focus option can be used to deal with this problem.
116
118 This manual page was written by Jim Diamond <Jim.Diamond@acadiau.ca>.
119 I am the current maintainer of the X11 versions of pdfopen and pdf‐
120 close. Report any bugs you find to me. Feature enhancement requests
121 are welcome, coded enhancements even more so.
122
123 Past authors: Fabrice Popineau wrote the MS-windows versions of pdfopen
124 and pdfclose upon which these programs were originally based. Taco
125 Hoekwater created the GNU/Linux versions, up to Version 0.61 (including
126 some documentation which inspired parts of this man page). Peter Bre‐
127 itenlohner has contributed both code and suggestions to versions later
128 than 0.61.
129
130
131
132pdfopen 0.86 2014-05-24 PDFOPEN(1)