New issue
Advanced search Search tips

Issue 759165 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

External links in PDF that is rendered in Chromes internal PDF viewer do not work

Reported by stephen....@gmail.com, Aug 25 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36

Steps to reproduce the problem:
1. Create a PDF with an external hyperlink in it. e.g. "/foo/bar.html"
2. Deploy that PDF file to a server e.g. "https://example.com/baz/file.pdf"
3. Navigate to that PDF file in the browser
4. Attempt to click on that link, which should navigate you to: "https://example.com/foo/bar.html" (since it is a relative link)
5. Notice no navigation occurs

What is the expected behavior?
Navigation to the specified external link (relative or absolute)

What went wrong?
No navigation at all

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 60.0.3112.101  Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Note that just disabling the internal PDF viewer is not an option to fix relative links (its fine for absolute), as when the default app takes it (e.g. Adobe Reader) then it is loading the file from temp files or a save location (e.g. desktop) and thus the relative path won't work.  It works fine in IE/Firefox.
 
Components: Internals>Plugins>PDF
Labels: Needs-Triage-M60
Can you attach a test PDF to help demonstrate the issue?
Will do, I just need to generate a simple one.
A simple one is fine. Thanks for taking the time to file the bug and work on the example.
I've uploaded a simple attachment, and I've also hosted an exact copy of the attachment at this location:
https://cdn.glitch.com/9ad89ffe-eaff-4ff3-b1e5-4efe562c7c1a%2FsampleHyperlinkDoc.pdf?1503773768068

The absolute link will work, but the relative link won't work as there is no valid URL at the location it points to, but I didn't have another public host to put the file on.  Feel free to host the attached file somewhere better.
Hmm, after uploading the file to the Glitch domain it does seem to recognize the external link fine. (This PDF was generated directly from MS Word). I wonder if there are multiple ways to define hyperlinks and some work, and some don't?

I will have to get another sample as generated from another source.
Grr, Word borked my relative link PDF... this version is correct.
sampleHyperlinkDoc.pdf
89.5 KB Download
Oh, and here is the new file, uploaded to Glitch.com

https://cdn.glitch.com/9ad89ffe-eaff-4ff3-b1e5-4efe562c7c1a%2FsampleHyperlinkDoc.pdf?1503774913520

The relative link will "work" now in say Firefox... though the location it maps to is a 404.

Both absolute and relative links appear to work in Chrome... with this file.  Thus I'm lead to believe that the other tools being used to generate PDFs either generate a different type of link (I'm not too familiar with the internals of PDFs) or there is something else a miss.  I will need to try generating a small repro PDF from the tools that we know cause this bug.
Status: WontFix (was: Unconfirmed)
If I'm understanding comment #8 this is working correctly in Chrome? If that isn't the case, please attach a PDF file which shows the issue.

Sign in to add a comment