You can clone with
HTTPS or Subversion.
I'll let the attachments speak for themselves...
Looks like it's an absence of the fillRule for the canvas. Long story short: Firefox has mozFillRule, other browsers are still thinking. Read more at:
An implementation/support without this attribute will not look pretty or fast.
Small code to replicate the issue ( http://jsbin.com/ayoyej/1/edit ):
ctx.rect(10, 10, 100, 40);
ctx.rect(15, 15, 90, 30);
ctx.mozFillRule = 'evenodd';
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.
Added example PDF for Issue #2351
My WebKit patch seems to have triggered a discussion on the webkit-dev mailing list with an update to the HTML5 specification.
@jwal, thank you for doing that. We have similar discussion here at #2534. However I can accept #2487 first (when the last comment is addressed) -- the specification defines fillRule now. We can always change the code to make it work with eoFill later.
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.
If I cant solve this issue, I will pay support for a hand here, if somebody is able to help me for fix the PDF.js package at my server.
Got it, I was complicating the solution, thanks for the help.
Fixed by above PR.