# [pdftex] hyperref and relative local files

James W. Haefner James.Haefner at usu.edu
Thu Feb 24 03:04:07 CET 2005

2nd follow-up and conclusion:
The \href{} line below also works with linux acroread 5.06/5.0.10 *as
long as" the mozilla browser is already open (RH9 and FC3).  It fails if
it is not open, but a subsequent click on the link will work.  So,
perversely, if the user double clicks *slowly* it works the "first"
time. I haven't tested it on other linux browsers.

Jim

On Wed, 2005-02-23 at 18:19, James W. Haefner wrote:
> Follow-up:  I've learned that the following works in Windows using
> acrobat 6.0:
>
> \href{run:subdir/index.html}{Local}
>
> -j
>
>
> On Wed, 2005-02-23 at 17:34, James W. Haefner wrote:
> > I apologize for this mostly off-topic question, but I do not have access
> > to comp.text.tex and there may be a relation to pdftex... I'm using
> > hyperref version hyperref 2003/11/30 v6.74m.   Here's what I tried to
> > post:
> >
> > This question/problem has been asked many times before, but so far
> > it has not been answered that I can tell after googling the archives.
> > Hopefully I missed something obvious.
> >
> > I want to put a pdf with hyperref on a CD and have a link
> > to a local file that will be opened by a browser.  E.g.:
> >
> > \documentclass{article}
> > \usepackage{hyperref}
> > \begin{document}
> > \end{document}
> >
> > where "subdir" is a directory on the CD and index.html is
> > is an index file for a html file on the CD.
> > I've tried various permutations of the \href
> > line (eg, 0 slashes, 3 slashes, a leading dot), but mostly I get the
> > error:
> > Can not open "file:/subdir/index.html"
> >
> > In other words, something is putting a forward slash
> > in front of the path.  Is there no way around this, even an inelegant
> > hack involving a hand-coded \special?  Is it a problem with hyperref or
> > browsers?  How can I solve my problem?  (Clearly, a CD can be mounted
> > anywhere, so absolute paths (which work correctly) are not a viable
> > solution.)
> >