go back to homepagePdfopen for X11The command-line programs pdfopen and pdfclose allow you to control the X Window System version of Adobe's Acrobat Reader from the command line or from within a (shell) script. BackgroundMost people who use the Acrobat Reader to preview PDF files generated from TeX documents will know that it is a hassle to deal with documents that need to be compiled while being viewed. The Linux version of Adobe's Reader simply does not notice that the PDF file has changed, and the Microsoft Windows version is even worse: it opens the PDF file using mandatory locking, making it absolutely impossible to recompile the document while it is still open in the Reader. Because the problem was much more severe under Windows, a few years ago Fabrice Popineau has written two small programs that use DDE calls to control the Reader from an external script or batch
The command linespdfclose --file <pdf file> pdfclose --all pdfopen pdfopen --file <pdf file> [--page <pagenumber>] Normally, that last one is the command you want to use under Linux, because it will immediately re-open the PDF file you have given as an argument in the Reader, using the same page & view settings. UsabilityI've tested my programs with Acrobat Reader 5.0.10 under Mandrake Linux 10.1 using X.org 6.8.2, but the code is reasonably generic and should work without changes on most X11 implementations.The programs will work using the new Adobe Reader 7.0 under Linux as well, but only if you keep your PDF files maximized within the main Adobe Reader window. The PDF document's name has to appear in the window title for the progams to work. Also, you probably want to set the preference "Reopen documents to last viewed page" to "All files". You can find this setting in the Startup page of the preferences screen. DownloadsDownload pdfopen: source Documentation: xpdfopen.pdf. LicensingThe programs are released to the public domain. Feel free to use the programs as you see fit, and happy TeXing! BugsIf you find a bug in the program, feel free to e-mail me directly. Or, if you expect the problem to be of more general interest, post a message to the tex-live mailing list. Taco Hoekwater, Feb 27, 2007. |