Want to improve this question? Update the question so开发者_如何学Python it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this questionIs there a way to link to an external application (so that it starts) when clicking on a link in a PDF file, e.g. in a beamer class LaTeX file?
I usually use the movie
command of the multimedia
package to open any video, audio, image file in an external viewer. But no, it will not open programs.
\frame{
\movie[externalviewer]{Audio Title}{audio.wav}
\movie[externalviewer]{Video Title}{video.mp4}
\movie[externalviewer]{Image Title}{image.jpg}
\movie[externalviewer]{PDF Title}{doc.pdf}
\movie[externalviewer]{Gedit}{/usr/bin/gedit} % does not work
}
It is possible! The following works well with my Acrobat, involves a bit PDF hacking. Just tested it on my Mac, you have to adjust it according your platform. Simply define the following macro
\newcommand{\LaunchBinary}[2]{%
% #1: layer name,
% #2: link text
\leavevmode%
\pdfstartlink user {
/Subtype /Link
/Border [0 0 0]%
/A <<
/F <<
/DOS (xxx)
/Unix (xxx)
/Mac (#1)
>>
/S /Launch
>>
}#2%
\pdfendlink%
}
Fix the "xxx" to maybe #1 as well or rewrite it to suit your need. Then, to add a link somewhere in the PDF called "Start" which launches "demos/1/Wave1D.app", just
\LaunchBinary{demos/1/Wave1D.app}{Start}
This works well even for beamer class. With this, I can directly launch demo apps from a fullscreen presentation. Awesome!
Note again, though, this apparently only works with Adobe Acrobat (Reader). MacOS "Preview" does not work.
I'm quite sure you can't. It's very application-dependent, system-dependent, and other-1000-things-dependent.
Afaik only url works quite well...
精彩评论