auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX] Re: preview with acrobat reader


From: Christian Schlauer
Subject: [AUCTeX] Re: preview with acrobat reader
Date: Tue, 07 Aug 2007 23:44:48 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Alan Ristow <address@hidden> writes:

> Joost Kremers wrote:

[...]

>> one problem with acrobat reader, IMHO a fatal flaw, is that it doesn't seem
>> to offer any way of rereading a pdf file.
>
> I haven't read this group in a little while and missed the start of
> this thread, but I've found that pdfopen and pdfclose (part of
> pdftools, available on CTAN) can be used to open and close PDFs with
> Acrobat and return to the last opened page upon re-opening. See:
>
> http://magic.aladdin.cs.cmu.edu/2005/07/15/pdfopen-and-pdfclose/
>
> The pdftools binaries are distributed with MiKTeX (though I don't
> recall whether they're there by default or I had to install them via
> the package manager). I can't say whether they're present in other
> distributions.

They are present in MiKTeX by default -- they are also present on
Ubuntu GNU/Linux with TeXLive 2005:

$ dpkg --search pdfopen
texlive-pdfetex: /usr/bin/pdfopen
texlive-pdfetex: /usr/share/man/man1/pdfopen.1.gz

,----[ man pdfopen ]
|       --all,--page
|               These arguments, accepted by Fabrice Popineau's Windows
|               originals  of   pdfopen  and  pdfclose,   are  silently
|               ignored.
`----

That means on GNU/Linux, you can't tell the Reader to jump to a
certain page.

> I've only tried them manually from the command line,

So did I.

> but that works fine for me with Reader 8 (though pdfclose will only
> work on files opened with pdfopen unless you close all files).

My (brief) tests also showed that one can open PDFs on specific pages,
whether Adobe Reader is already running or not. In order to close
individual PDF files, however, they must have been opened via pdfopen,
as you write. The `--page' mentioned in the man-page above is an
option to pdfopen (see below), and `--all' is an option to pdfclose on
MS Windows (see below).

,----[ Cygwin Bash shell on MS Windows ]
| bash-3.2$ pdfopen --help
| Usage: f:\miktex\miktex\bin\pdfopen.exe [OPTION...]
|   --file=FILE         Open FILE.
|   --page=N            Go to the N-th page.
|   --goto=NAMEDEST     Go to the specified named destination within the
|                       document.
|   -V, --version       Print version information and exit.
| 
| Help options:
|   -?, --help          Show this help message
|   --usage             Display brief usage message
| bash-3.2$ pdfopen --file=foo.pdf --page=7
| bash-3.2$ pdfclose --help
| Usage: f:\miktex\miktex\bin\pdfclose.exe [OPTION...]
|   --all             Close all files.
|   --file=FILE       Close FILE.
|   -V, --version     Print version information and exit.
| 
| Help options:
|   -?, --help        Show this help message
|   --usage           Display brief usage message
| bash-3.2$ pdfclose --file=foo.pdf
| bash-3.2$ # opened foo.pdf by double-clicking on it, try
| bash-3.2$ # to close it with pdfclose
| bash-3.2$ pdfclose --file=foo.pdf
| arctrl: The command could not be executed.
| bash-3.2$
`----

> I made one feeble attempt to get AUCTeX to call pdfclose prior to
> running pdflatex and use pdfopen to open the file, with no luck.
>
> I hadn't mentioned my difficulties here yet because I was hoping to
> put a little more effort in before requesting help, but this seems
> like a good time to bring it up since it seems to be a hot topic right
> now. Unfortunately, I don't have any time to invest in it at the
> moment, but if someone else wants to have a go it seems like a lot of
> people would find it useful.

I second that.

-- 
Christian Schlauer





reply via email to

[Prev in Thread] Current Thread [Next in Thread]