PDFOPEN(1)
π PDFOPEN(1) β¨ NAME
okay so bestie, the manual name is pdfopen and its sidekick is pdfclose π. Both are tiny programs that open or close a PDF file viewer. Iconic duo, no cap π .
π§Ύ SYNOPSIS
pdfopen [ options ] [ --file ] file.pdf
pdfclose [ --file ] file.pdf
πΈ OPTIONS
-h,--help,-?β asks for the help text and then exits. Literally the "I'm lost" button π.-v,--version,-Vβ prints the version number and exits β¨.-p <n>,--page <n>β when the viewer starts up, it jumps to page n of the document π. Heads up: not every viewer knows this trick, and even the ones that do only respect it when the document first loads. This one gets overruled by-gif you use both, so it's giving second place energy π₯.-g <named destination>,--goto <named destination>β when the viewer starts, it opens the page holding that named destination π§. Same catch as above: not every viewer supports it, and it only kicks in on the initial load.-r,--reset_focusβ after the commands go to the PDF viewer, it tries to give the cursor focus back to whichever window had it before. This is the fix for when the viewer keeps stealing your focus and it's lowkey so annoying π.-viewer <ar9|ar9-tab|ar8|ar7|ar5|xpdf|evince>,--viewer <ar9|ar9-tab|ar8|ar7|ar5|xpdf|evince>β picks your viewer: Adobe Reader 9 in a new window, Adobe Reader 9 in a new tab of an already running AR9 (if there is one), Adobe Reader 8, Adobe Reader 7, Adobe Reader 5, xpdf, or evince π¦. Adobe Reader 9 in a new window is the default, so if you don't pick, that's what you get π.
π RATIONALE
okay so picture this: you're in the middle of TeX document prep and you're stuck in an "edit-compile-view" loop π. The problem is that PDF viewers like Adobe's Acrobat Reader (acroread) don't refresh on their own when the PDF changes, so the loop gets super clunky. That's where pdfopen comes in, automating the reload whenever the document changes β¨.
Note: honestly,pdfcloseis basically unnecessary on GNU/Linux π. Unlike MS windows,acroreaddoesn't lock the PDF file, so pdftex (or a DVI to PDF converter) can happily write a new version of the output. It's still included in case someone finds it useful, so no judgment π«Ά.
π¦ DESCRIPTION
pdfopen goes hunting for a running copy of the chosen (or default) PDF viewer that's showing the given PDF file π. If it finds one, it tells that viewer to reload the file. If there's no such instance, pdfopen starts the viewer with that document instead.
The default viewer is acroread, which could launch any of several Acrobat Reader versions depending on what's installed on your system π. The reload commands are different from one version to the next, though, so if you're on something other than AR9, you should explicitly name the viewer program bestie π.
This version of pdfopen accepts these viewer options: ar9, ar9-tab, ar8, ar7, ar5, xpdf, and evince.
The difference between ar9 and ar9-tab matters when no AR9 is already showing the document. With ar9, acroread gets told to open a brand new instance (and therefore a new window) using the -openInNewInstance argument πͺ. With ar9-tab, acroread starts without that argument, so if an acroread is already running, the document pops up as a new tab in an existing window ποΈ.
pdfclose searches for one of the viewers above that's displaying the given file, then tells it to "close" the window πͺ. Most of the time the viewer keeps running, maybe just sitting there with a blank window. (This behaviour varies a bit between PDF viewers, fyi.)
π PORTABILITY AND AVAILABILITY
These programs have been tested on Slackware64 Version 14.1 and a few other versions and distributions of GNU/Linux π§. The code is pretty generic and should work out of the box with most recent X11 implementations. If it doesn't, reports are welcome, especially if they come with robust fixes π οΈ.
These programs are built for X11-based systems. If you somehow stumble upon compiled versions on a system running a different window system, they're very unlikely to be useful to you π.
Source and binaries can be downloaded from CTAN://support/xpdfopen/ (e.g., http://mirror.ctan.org/support/xpdfopen) π¦.
β οΈ CAVEATS
Heads up: if you usear9-tabto reload the document and theacroreadinstance that has it is currently showing a different document, the command will display your document but won't reload it π¬.
pdfopen works by searching for a window whose name (window title) matches what's expected for the given viewer and document π. If your viewer's window name for some reason isn't what's expected, pdfopen might not work for you.
With at least AR9 and some window managers, using pdfopen to reload the document gives focus to the acroread window, even if your mouse cursor isn't in that window π€. It can be super annoying. The -reset_focus option is there to deal with exactly this problem π
.
π©βπ» AUTHOR
This manual page was written by Jim Diamond <Jim.Diamond@acadiau.ca>. He's the current maintainer of the X11 versions of pdfopen and pdfclose, so report any bugs you find to him π. Feature enhancement requests are welcome, and coded enhancements even more so π.
Past authors: Fabrice Popineau wrote the MS windows versions of pdfopen and pdfclose, which these programs were originally based on π·. Taco Hoekwater created the GNU/Linux versions, up to Version 0.61 (including some documentation that inspired parts of this man page) π. Peter Breitenlohner has contributed both code and suggestions to versions later than 0.61 π.
β¨ bestie, that's the whole page: pdfopen version 0.86, last updated 2014-05-24 π. Now go reload your PDFs and slay the edit-compile-view loop ππ
π¦
π¦ where this page comes from
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- debian bookworm: texlive-binaries 2022.20220321.62855-5.1+deb12u2
- debian trixie: texlive-binaries 2024.20240313.70630+ds-6 Β· TeX-Live
- fedora 43: texlive-xpdfopen 11:svn65952-93.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 43: texlive-xpdfopen 11:svn65952-95.fc43.1 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: texlive-xpdfopen 12:svn65952-105.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: texlive-xpdfopen 12:svn65952-111.fc44 Β· LicenseRef-Fedora-Public-Domain
- opensuse-leap 16.0: texlive-xpdfopen 2025.221.0.0.86svn65952-160000.3.1 Β· SUSE-Public-Domain
- ubuntu jammy: texlive-binaries 2021.20210626.59705-1build1
- ubuntu jammy: texlive-binaries 2021.20210626.59705-1ubuntu0.3
- ubuntu noble: texlive-binaries 2023.20230311.66589-9build3 Β· TeX-Live
- ubuntu questing: texlive-binaries 2024.20240313.70630+ds-6ubuntu2 Β· TeX-Live
- ubuntu resolute: texlive-binaries 2025.20250727.75242+ds-5build1 Β· TeX-Live
- ubuntu stonking: texlive-binaries 2026.20260303.78225+ds-5ubuntu1 Β· TeX-Live
- π girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms