[pdftex] Launching programs...

Herman Bruyninckx Herman.Bruyninckx at mech.kuleuven.ac.be
Wed Sep 10 19:27:12 CEST 2003


On Wed, 10 Sep 2003, G. D. Brettschneider wrote:

[...]
> Well, there's at least one case that Acrobat Reader can lauch another
> application under Linux out of a PDF: When clicking on an email address
> created like this (see samplepdf.tex) ...
> 
I found this on the web some time ago, and have used it with success
to launch _any_ program. (Under Linux, mostly using xpdf.)

% Macro for starting external programs:
\newsavebox{\MyBox}
                                                                                
\newcommand{\StartApp}[2]{%
 \savebox{\MyBox}{#1}%
 \pdfannot width \wd\MyBox height \ht\MyBox depth \dp\MyBox{
 /Subtype /Link
 /A << /S /Launch /F (#2) >>
 }#1
}

\StartApp{\includegraphics[height=2cm]{picture.jpg}}{mplayer movie.mpg}


Herman

-- 
  K.U.Leuven, Mechanical Engineering, Robotics Research Group
<http://people.mech.kuleuven.ac.be/~bruyninc> Tel: +32 16 322480



More information about the pdftex mailing list