Pdf.js: Highlight showing over text in IE, but works in Chrome/Firefox

Created on 4 Sep 2014  路  15Comments  路  Source: mozilla/pdf.js

There is a text that was highlighted but in IE the highlight is showing over the text and hiding the original text. However, in Chrome and Firefox the highlight works as expected. Screenshots are shown below.

In IE:
hightlight

In Chrome:
highlight chrome

Thanks,
MSLA-IT

3-upstream

Most helpful comment

We had the same issue in our integration of pdf.js. We implemented the workaround of tbasse for internet explorer. Thanks @tbasse
Will this fix or an other implementation find a way into pdf.js? I want to modify the original code as less as possible.
Thx Stefan

All 15 comments

Could you provide link to the PDF document?

Duplicate of #3900

IE does not implement blending modes. We need to report that to https://connect.microsoft.com

We tried the suggestion in #3900 but it still doesn't work. Should we include something in the compatibility.js as well?

Not sure, as a prototype code snippet shall work in IE.

We got it working.

But we changed a different line of code.

highlight fix

Thanks,
MSLA-IT

@msladev, your solution worked perfectly for us until we stumbled upon some PDFs which rendered other image and shape elements with a 50% transparency due to this change.

Example PDF: https://dl.dropboxusercontent.com/u/1652601/ht-1-handbook.pdf

We then moved the workaround to CanvasGraphics_beginAnnotation() and only apply it for IE so it only affects the text highlight and only when it needs to.

screen shot 2015-04-25 at 10 42 43 am

Thanks @tbasse, works great.

We had the same issue in our integration of pdf.js. We implemented the workaround of tbasse for internet explorer. Thanks @tbasse
Will this fix or an other implementation find a way into pdf.js? I want to modify the original code as less as possible.
Thx Stefan

@yurydelendik, would you be open to a contribution that implements this workaround? I highly doubt that Microsoft will be addressing this on their end.

This workaround is not acceptable for in the core because we don't want browser-specific hacks in there, but it may be accepted if it can be feature-detected and placed in https://github.com/mozilla/pdf.js/blob/master/src/shared/compatibility.js.

Makes sense, thanks @timvandermeij!

Closing IE11/Edge (non-Chromium-based) issues in response to #11211. Please note that, as outlined in https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support, only bugs which completely prevent the library and/or the default viewer from running will be accepted.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SehyunPark picture SehyunPark  路  3Comments

jigskpatel picture jigskpatel  路  3Comments

timvandermeij picture timvandermeij  路  4Comments

patelsumit5192 picture patelsumit5192  路  3Comments

liuzhen2008 picture liuzhen2008  路  4Comments