[pdftex] Launching programs...

Thierry Bouche thierry.bouche at ujf-grenoble.fr
Thu Sep 11 10:52:51 CEST 2003



Le mercredi 10 septembre 2003, à 18:27:12, Herman Bruyninckx écrivit :


HB> I found this on the web some time ago, and have used it with success
HB> to launch _any_ program. (Under Linux, mostly using xpdf.)

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

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

Ah, great! in fact this is what hyperref will put in the PDF if you
say \href{run:mplayer movie.mpg}, which doesn't work under windows
(where \href{run:movie.mpg} would work, relying on windows
associations). Maybe using the /Win key would help having both OSes
happy...

I had tested only half of the possibilities: thanks!




-- 
Cordialement,
 Thierry                         



More information about the pdftex mailing list