Forum moved here!

Home / Local Hyperlink problem

wef

The link to a local file does not work in version 3.2. It works in 3.1.2 and in other pdf reader.

GitHubRulesOK

Most probably a currently former known open issue that should now be fixed see entry Local Hyperlink problem below or closed issue
https://github.com/sumatrapdfreader/sumatrapdf/issues/1506

Does it add the file:// prefix part way through the link ?

wef

I have the same problem.

voICEwork

Recently viewing a pdfTeX + eplain created file with a local figure figure.jpg :

\href{figure.jpg}{\includegraphics[width=3.0truein]{figure.jpg}}

Copy Link Address gives

file://figure.jpg

Clicking in the figure gives the error:

(full file path and name) not found.)

This is just today - been using Sumatra with inverse search for many years!

Previously clicking the figure opened figure.jpg in the default viewer.

Currently version 3.2 - switched from 3.3.13146 updates when I got the error

GitHubRulesOK

Unfortunate relative file bug introduced with major overhaul of MuPDF that changed some inter-related abilities. For LaTeX users I would suggest that unless there is a major advantage to you in 3.2, then consider using both 3.1.2 and latest 3.3 pre-release (3.3.13500+) rather than 3.2.
One could be portable and the other installed or both installed or both portable, those choices are generally exclusive.

SumatraPeter

Reported 6 months ago, but the dev doesn’t seem to have got around to it yet:

lucap

hi,
i created a link with this structure (file///c:\evolution\cattura.jpg) on a word file.
after printing the file into pdf and opened with acrobat reader works fine.
if i try to open the link with sumatra pdf it doesn’t work. i can see that the program try to open a link composed with the file position (my desktop) and then the correct link.

can someone help me?

SumatraPeter

As mentioned by the dev above, can’t use absolute links. Unfortunately since 3.2 there’s a known bug with relative links too:

@kjk: Any chance we can have this fixed soon?

GitHubRulesOK

As @SumatraPeter has shown and Acrobat should have requested authority to open such a link
There are pitfalls in using such machine specific links as when run unchecked they can target known PC commands by a malicious author.
For that reason version 3.1.2 should allow a subset of relative links, It is not a secure system since relative links can be crafted to try working up/down different paths.

I personally would like ALL links to show their true target and be a user choice/option to allow without confirmation.

kjk

Those issues should be fixed with https://github.com/sumatrapdfreader/sumatrapdf/commit/09562b0ae6fdfa5954ae2fa5f851199235f59d1b and https://github.com/sumatrapdfreader/sumatrapdf/commit/6e7c80dc9372312a1cbec97678ad4eb08e8e042c

Marcus

The problem described in this topic occurs again in 3.3.3. Links to pages of other pdfs, created with the latex hyperref-package and \href[page=7]{local.pdf} do not work anymore in 3.3.3. When I revert to 3.1.2, the local.pdf is opened at page 7. In version 3.3.3, local.pdf is still opened, but not at page 7

GitHubRulesOK

May seem odd but 3.3.3 is just key stable fixes to 3.3 (not all latest related changes) The best way to check current hyperlink behaviour is Portable 3.4 Pre-release (but on any day it can be less stable) Fresh Problem files are needed if you feel there is still a bug (though some are already reported)

Marcus

Thanks for the speedy reply. The problem did not occur with 3.3.1. Well, I guess I’ll wait a while and try again when a new update comes under the principal download link. Thanks again.

kjk

It’s pretty much impossible that this would change between 3.3.1 and 3.3.3. There were no changes that would affect link handling.

There might be regression in 3.4 pre-release but the only way it gets fixed is if you create an issue and provide a PDF that shows the problem.