mozilla / pdf.js

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

Customised text-shadow CSS rendered inconsistently in pdf.js #1200

Closed Fanolian closed 11 years ago

Fanolian commented 12 years ago

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0a1) Gecko/20120210 Firefox/13.0a1 pdf.js 0.2.213

I have a CSS in userContent.css that applies text shadows to all characters in normal webpages and it works fine. *{ text-shadow: 1px 1px 0px rgba(0,0,0,0.2); }

However in any PDF documents opened by pdf.js, the shadows are rendered inconsistently across the document. Sample PDF: http://partners.adobe.com/public/developer/en/livecycle/lc_pdf_overview_format.pdf Screenshot of the said problem: http://i.imgur.com/82vKh.png

brendandahl commented 12 years ago

I think you're going to have a to write a rule to turn this off for pdf.js. We have a text layer on top of the canvas used for text selection which doesn't always match up with the text behind it. Unfortunately we don't have very specific tags but something like this should work. .viewer .page { text-shadow: none; }

arturadib commented 12 years ago

This will go away if the new text selection backend (#1205) is adopted.

brendandahl commented 11 years ago

As mentioned above I don't think there's anything we should really do on our end since we can't support every modification a user makes to userContent.css.