{
    "mode": "man",
    "parameter": "pdfopen",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pdfopen/1/json",
    "generated": "2026-06-02T20:22:23Z",
    "synopsis": "pdfopen [ options ]  [ --file ]  file.pdf\npdfclose [ --file ]  file.pdf",
    "sections": {
        "NAME": {
            "content": "pdfopen, pdfclose - open or close a PDF file viewer\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pdfopen [ options ]  [ --file ]  file.pdf\npdfclose [ --file ]  file.pdf\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-h, --help, -?",
                    "content": "output help and exit.\n",
                    "flag": "-?",
                    "long": "--help"
                },
                {
                    "name": "-v, --version, -V",
                    "content": "output the version number and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                },
                {
                    "name": "-p <n>, --page <n>",
                    "content": "when  starting  the  viewer, display page <n> of the document (notes: not all viewers\nsupport this feature, and even in those cases this option only has  effect  when  the\ndocument is initially loaded).  This option is over-ridden by -g.\n",
                    "flag": "-p",
                    "long": "--page",
                    "arg": "<n>"
                },
                {
                    "name": "-g <named destination>, --goto <named destination>",
                    "content": "when  starting the viewer, display the page of the document containing the named des‐\ntination (notes: not all viewers support this feature, and even in those  cases  this\noption only has effect when the document is initially loaded).\n",
                    "flag": "-g",
                    "long": "--goto"
                },
                {
                    "name": "-r, --reset",
                    "content": "after  sending  commands  to  the PDF viewer, attempt to reset the input focus to the\nwindow which had focus before the commands were sent.\n",
                    "flag": "-r",
                    "long": "--reset"
                },
                {
                    "name": "-viewer, --viewer",
                    "content": "use (respectively) Adobe Reader 9 (in a new window), Adobe Reader 9 (in a new tab  of\na  running  AR9,  if  any),  Adobe  Reader 8, Adobe Reader 7, Adobe Reader 5, xpdf or\nevince as the PDF viewer program.  Adobe Reader 9 (in a new window) is the default.\n",
                    "long": "--viewer"
                }
            ]
        },
        "RATIONALE": {
            "content": "At certain points of TeX document preparation, many people repeat a  \"edit-compile-view\"  cy‐\ncle.   Since PDF viewers such as Adobe's Acrobat Reader (\"acroread\") do not automatically re‐\nfresh the display when the PDF file changes, this cycle can be more cumbersome than  desired.\nThe  pdfopen  program provides the ability to automate the reloading of the PDF document when\nit is changed.\n\nNote: there seems to be little need for pdfclose under GNU/Linux, since (unlike the situation\nfor  MS windows) acroread does not lock the PDF file, which would prevent pdftex (or a DVI to\nPDF converter) from creating a new version of the PDF output file.  However, pdfclose is pro‐\nvided in case someone finds it useful.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "pdfopen  searches  for  an  instance  of the specified (or default) PDF viewer displaying the\nspecified PDF file.  If there is already an instance of the given viewer displaying the given\nfile, the viewer is instructed to reload the file.  If no such instance is found, pdfopen at‐\ntempts to run the specified viewer on the specified document.\n\nThe default viewer is \"acroread\", which could start any one of a number of versions of  Acro‐\nbat  Reader,  depending on what is installed on your system.  However, the commands to reload\nthe current document vary from one version of acroread to another; consequently, if  you  are\nusing a version of acroread other than AR9, you should explicitly specify the viewer program.\n\nThis version of pdfopen accepts the following viewer options:\nar9, ar9-tab, ar8, ar7, ar5, xpdf, and evince.\nThe  difference  between  ar9 and ar9-tab is significant when there is no instance of AR9 al‐\nready displaying the requested document.  In this situation, while ar9 will request  acroread\nto  create a new instance of acroread (and thus open a new window) by using the -openInNewIn‐‐\nstance argument, ar9-tab starts acroread without this argument; if there is  already  an  in‐\nstance of acroread running, a new tab will be opened in an existing window.\n\npdfclose  searches  for  one of the above PDF viewers displaying the given file and instructs\nthe viewer to \"close\" the window.  In most cases, the PDF viewer continues to  run,  possibly\nnow  displaying  just a blank window.  (This behaviour varies somewhat from one PDF viewer to\nanother.)\n",
            "subsections": []
        },
        "PORTABILITY AND AVAILABILITY": {
            "content": "These programs have been tested on Slackware64 Version 14.1 and a few other versions  /  dis‐\ntributions of GNU/Linux.  The code is reasonably generic and should work out of the box using\nmost recent X11 implementations.  (Reports to the contrary are welcome, particularly if  they\ncome with robust fixes.)\n\nThese  programs are designed for X11-based systems.  If you somehow find compiled versions of\nthese programs on a system using another window system, they are very unlikely to be  of  any\nuse to you.\n\nSource  and  binaries  of the programs can be downloaded from CTAN://support/xpdfopen/ (e.g.,\nhttp://mirror.ctan.org/support/xpdfopen).\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "If you use ar9-tab to reload the PDF document and the instance of  acroread  with  the  given\ndocument  is currently displaying some other document, the command causes your document to be\ndisplayed, but not reloaded.\n\npdfopen works by looking for a window with a name (window title) matching that  expected  for\nthe  given  viewer  and document.  If for some reason your viewer's window name is not as ex‐\npected, pdfopen may not work for you.\n\nWith at least AR9 and some window managers, using pdfopen to reload the document gives  focus\nto the acroread window, even though the mouse cursor is not necessarily in that window.  This\ncan be annoying.  The -resetfocus option can be used to deal with this problem.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "This manual page was written by Jim Diamond <Jim.Diamond@acadiau.ca>.  I am the current main‐\ntainer of the X11 versions of pdfopen and pdfclose.  Report any bugs you find to me.  Feature\nenhancement requests are welcome, coded enhancements even more so.\n\nPast authors: Fabrice Popineau wrote the MS-windows versions of  pdfopen  and  pdfclose  upon\nwhich  these  programs were originally based.  Taco Hoekwater created the GNU/Linux versions,\nup to Version 0.61 (including some documentation which inspired parts of this man page).  Pe‐\nter Breitenlohner has contributed both code and suggestions to versions later than 0.61.\n\n\n\npdfopen 0.86                                 2014-05-24                                   PDFOPEN(1)",
            "subsections": []
        }
    },
    "summary": "pdfopen, pdfclose - open or close a PDF file viewer",
    "flags": [
        {
            "flag": "-?",
            "long": "--help",
            "arg": null,
            "description": "output help and exit."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "output the version number and exit."
        },
        {
            "flag": "-p",
            "long": "--page",
            "arg": "<n>",
            "description": "when starting the viewer, display page <n> of the document (notes: not all viewers support this feature, and even in those cases this option only has effect when the document is initially loaded). This option is over-ridden by -g."
        },
        {
            "flag": "-g",
            "long": "--goto",
            "arg": null,
            "description": "when starting the viewer, display the page of the document containing the named des‐ tination (notes: not all viewers support this feature, and even in those cases this option only has effect when the document is initially loaded)."
        },
        {
            "flag": "-r",
            "long": "--reset",
            "arg": null,
            "description": "after sending commands to the PDF viewer, attempt to reset the input focus to the window which had focus before the commands were sent."
        },
        {
            "flag": "",
            "long": "--viewer",
            "arg": null,
            "description": "use (respectively) Adobe Reader 9 (in a new window), Adobe Reader 9 (in a new tab of a running AR9, if any), Adobe Reader 8, Adobe Reader 7, Adobe Reader 5, xpdf or evince as the PDF viewer program. Adobe Reader 9 (in a new window) is the default."
        }
    ],
    "examples": [],
    "see_also": []
}