[pdftex] hyperlinks to other documents in the pdf file

Andreas Matthias amat at kabsi.at
Fri May 25 00:37:58 CEST 2001


From: "John Robert Kitchin" <jkitchin at udel.edu>

> I have been trying to include hyperlinks to other types of files in the
> pdf files generated by pdflatex.  I have been using \href, but it is not
> working.  If the file it refers to is a pdf file, then acrobat reader
> opens it just fine, and if it refers to an html document somewhere,
> netscape launches and finds the document fine. But if it is anything else,
> such as a tif or txt file, netscape complains that it can't find the
> server or something similar.  Am I missing something?

PDF specifies a so called `Launch Action' with which you
can launch any application. Provided that the operating
systems knows what to do with a special file type.
Try the following.

Greetings,
Andreas

\documentclass{article}
\newsavebox{\MyBox}
\newcommand{\StartApp}[2]{%
\savebox{\MyBox}{#1}%
\hskip0pt
\pdfannot width \wd\MyBox height \ht\MyBox depth \dp\MyBox{
/Subtype /Link
/A <<
/S /Launch
/F (#2)
>>
%/Border [16 16 0]
}#1}

\begin{document}
\StartApp{Kick me}{movie.mpeg}
\end{document}




More information about the pdftex mailing list