-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome: Unexpected black fill in PDFs generated by Prince XML #2351
Comments
Looks like it's an absence of the fillRule for the canvas. Long story short: Firefox has
An implementation/support without this attribute will not look pretty or fast. |
Small code to replicate the issue ( http://jsbin.com/ayoyej/1/edit ):
|
Thanks for getting to the bottom of this so quickly. Out of interest, I had a go at working around this problem by generating slightly different PDFs. I have an example html file showing that something might be possible using Prince XML's |
Filed upsteam https://www.w3.org/Bugs/Public/show_bug.cgi?id=19932 |
I have a build of Chromium based on a modified WebKit that implements this feature. As stated, the operation was already available but just not exposed through the canvas. That changeset exposes it. Note, for compatibility with pdf.js I named the attribute mozFillRule instead of the more conventional webkitFillRule! After I have finished all testing, I will rework the patch and try to get it submitted to WebKit. |
I have now renamed the new property on the canvas in Chromuim to webkitFillRule (from mozFillRule). Here are some new links:
I guess my next task is to get these patches accepted, with any suggested improvements applied. |
My WebKit patch seems to have triggered a discussion on the webkit-dev mailing list with an update to the HTML5 specification. |
Well, the browser has been updated. Thanks to Rik. He has also provided a patched viewer that uses the new browser feature: See it working here: http://jwal.github.io/pdf.js/pdf.js-cabanier/web/viewer.html?file=../../example.pdf |
Please help with more info about it, I am trying to install the patched pdf.js without results, could you please explain more how to use this patch? something like step by step for beginners. Thanks |
Well, I did the changes according Pull Request #3201: Adds fill('evenodd') as alternative for mozFillRule,,, question do I have to have webkit full pack at the server running PDF.js? any config necessary at webkit side? Thanks for the help. |
Got it, I was complicating the solution, thanks for the help. |
Fixed by above PR. |
I'll let the attachments speak for themselves...
Versions:
The text was updated successfully, but these errors were encountered: