Pdf.js: Some hyperlinks and rest of line with the hyperlink is not shown

Created on 11 Feb 2019  路  2Comments  路  Source: mozilla/pdf.js

Some hyperlinks and rest of line with the hyperlink is not shown

PDF file is here:
dc_iprcvisa.pdf

Configuration:

  • Web browser and its version: Chrome 71.0.3578.98
  • Operating system and its version: Windows 10 Pro
  • PDF.js version: 2.2.2
  • Is a browser extension: no

Steps to reproduce the problem:

  1. open dc_iprcvisa.pdf in pdf.js
  2. First hyperlink and rest of the line is not shown, second one is shown correctly

What is the expected behavior? (add screenshot) Both hyperlinks will be shown

4-corrupted-pdf

Most helpful comment

The PDFs violate the PDF spec, which says that paths are not allowed inside text objects (BT...ET). In the hyperlinks the blue underline path is drawn inside a text object. PDF.js can't handle this properly because the last point of the path changes the position of the text that is drawn next. Thus the URL strings appear in the wrong position on the page, or completely outside the page.
issue10542_reduced.pdf

All 2 comments

In this PDF are all hyperlinks wrong - two are not shown and one is badly positioned. Text after hyperlink is also gone - but can be selected and copied to clipboard. So apparently text is there, but not shown.

decoded_20190211094122.pdf

The PDFs violate the PDF spec, which says that paths are not allowed inside text objects (BT...ET). In the hyperlinks the blue underline path is drawn inside a text object. PDF.js can't handle this properly because the last point of the path changes the position of the text that is drawn next. Thus the URL strings appear in the wrong position on the page, or completely outside the page.
issue10542_reduced.pdf

Was this page helpful?
0 / 5 - 0 ratings