-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Broken node support? (CanvasPattern.setTransform) #13724
Comments
There's even a possible patch in Automattic/node-canvas#1623, but it apparently hasn't landed yet (however I cannot tell if it'd fix this issue). Given the sheer number of long-standing issues fixed by the recent patches in /cc @brendandahl Can you see any possible work-around, specifically for Node.js environments? |
We could have an alternative path that goes back to the old way of adjusting the main canvas transform before fill/stroke. Some pdfs will be broken this way, but the majority will still work. I don't imagine this will a very clean approach. |
Yeah, agreed that it does sound quite messy and thus not great overall. What we could, and likely even should, do is probably to just catch the errors to prevent completely broken rendering. |
I can confirm that running with a local build of Automattic/node-canvas#1623 resolves this. |
Closing this issue, since there's not much more we can do here now, given that:
|
Attach (recommended) or Link to PDF file here https://github.com/mozilla/pdf.js/blob/8ab65ed32d0f99a5fd5bf6ce302acb25082910c0/test/pdfs/issue7847_radial.pdf
Configuration:
Steps to reproduce the problem:
What is the expected behavior? (add screenshot)
As of ac44afa,
pattern_helper.js
makes use ofCanvasPattern.setTransform(...)
, which has unfortunately not been implemented yet in the node canvas (Automattic/node-canvas#1411). Previously I've been able to use the pattern helper from within Node contexts.What went wrong? (add screenshot)
The text was updated successfully, but these errors were encountered: