-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix: calculateBackgroundRendering may return width or height less than 1 #2982
base: master
Are you sure you want to change the base?
Conversation
added fix from niklasvh#2982 Added prepare script.
thx for your pr, this fix has been merged to html2canvas-pro |
Thanks all. I have the same issue use version 1.4.1. Can you merge the commit and publish a new version ?@niklasvh |
Feel free to try using html2canvas-pro v1.5.6 or the most recent version. |
@yorickshan I try to use your repo version, but the image convert from canvas is not right. With same options used in html2canvas, i can get right image.
|
I didn't reproduce the issue using the latest version (1.5.6). Please feel free to submit a detailed issue to html2canvas-pro, preferably with a minimal demo. |
Bug:
Bug reports:
Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
I console the value of width and height , find that the height is less than 1 caught this error
calculateBackgroundRendering function return value width height may be less than 1, then createPattern function throw error
Closing issues
Fixes #2981