Bug 692592 - mupdf fails to open relative hyperlinks to local files
Summary: mupdf fails to open relative hyperlinks to local files
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P4 enhancement
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 21:17 UTC by Tim Scully
Modified: 2018-11-13 16:54 UTC (History)
4 users (show)

See Also:
Customer:
Word Size: ---


Attachments
a sample PDF document collection that demonstrates the bug (72.42 KB, application/zip)
2011-10-13 21:17 UTC, Tim Scully
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Scully 2011-10-13 21:17:30 UTC
Created attachment 8002 [details]
a sample PDF document collection that demonstrates the bug

This problem can be reproduced on the 0.9 Windows version of the mupdf viewer and on Android viewers which use the mupdf engine such as APV.

Open the attached zip file and navigate to the "Parent" directory and open "Parent\test parent document.pdf" 

Click on any of the hyperlinks.

Nothing happens; the linked PDF should open in mupdf.

Look in the PDF file "Parent\Child 1\test child document1.pdf" for a report which details the structure of the hyperlinks in these files. The PDF files were produced with Adobe PDFMaker running on Microsoft Word 2003 on Windows XP. The resulting PDF files and their hyperlinks behave properly in Adobe reader for Windows and in Foxit reader for Windows and in Adobe Reader on Linux. 

Please consider addressing this problem - it affects many open source PDF readers that are based on mupdf. There is a real use case for massively hyperlinked PDF document collections.
Comment 1 Robin Watts 2011-12-30 12:08:32 UTC
The MuPDF core already exposes enough of an API for readers to do this; we pass out the URI as encoded in the file - it is for the viewer app layer (i.e. APV etc) to resolve the relative URI against the current file URI to know what to load.

It is true that our current viewer does not do this, though, so marking this as an enhancement request.
Comment 2 Tor Andersson 2018-11-13 16:54:21 UTC
commit 2422e2c199edc40e85fabd2fe99717834b1d52b1
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Tue Nov 13 17:38:00 2018 +0100

    Bug 692592: Handle relative file links.
    
    The core library doesn't know where a document comes from, since we can
    open it as a stream, etc. Let the viewer handle relative file URLs.