mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.33k stars 9.97k forks source link

Hypelink in PDF not working in viewer #9283

Closed generiscorp closed 6 years ago

generiscorp commented 6 years ago

The pdf.js viewer doesn't not allow clicking on hyperlinks in PDF documents. I'm attaching a sample PDF - I created a sample Word document with a hyperlink and saved it as a PDF using Microsoft Word. Then opened with https://mozilla.github.io/pdf.js/web/viewer.html and the link is not clickable.

[Uploading Hyperlink.docx…]()

Attach (recommended) or Link to PDF file here: hyperlink.pdf

Configuration:

Steps to reproduce the problem:

  1. Create a document in Word with a hyperlink and save as PDF
  2. Open in viewer https://mozilla.github.io/pdf.js/web/viewer.html

What is the expected behavior? (add screenshot) Hyperlink should be clickable

What went wrong? (add screenshot) Hyperlink not clickable.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): https://mozilla.github.io/pdf.js/web/viewer.html

Snuffleupagus commented 6 years ago

Closing as duplicate of issue #9224 (and a multitude of others).

generiscorp commented 6 years ago

@Snuffleupagus I don't see this as a duplicate, there is no text with www that is not automatically hyperlinked, there is an actual hyperling in the content that works fine from Acrobat Reader and other tools like Brava and Arender. But it doesn't in PDF.js. The referred ticket refers to a different ticket.

Snuffleupagus commented 6 years ago

Quoting (myself) from https://github.com/mozilla/pdf.js/issues/9224#issuecomment-348458347, since it applies here as well:

That PDF file doesn't actually contain any links, but just standard text.

Such "links" can work in e.g. Adobe Reader, but only if you have enabled automatic creation of hyperlinks (this setting seems to default to on).

The issue is tracked in #3172, hence I'm closing this as duplicate.

THausherr commented 6 years ago

@generiscorp When I click on it with Adobe Reader DC nothing happens.