-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
toDataURL() very slow #1158
Comments
It's slow for me as well. |
Unfortunately I did not find any other solution, I had to use it with this delay. The solution I found was to use a css loader. At least until I can optimize this time |
Try this code:
In my project this change help me) |
You can try if |
It's really slow -_-" .... any idea ? |
umm... it would be faster to render a jpg than it would be to render a png and the default toDataURL() returns a png so it has a transparency layer... which takes longer |
It is still slow in 2019, when extracting 5-6 html content into pdf with html2canvas. |
how can I make it fast in react in any idea. function generatePdf() { |
Use html-to-image instead of html2canvas. It reduced the image rendering by ~95% for me |
I have a report with charts and tables.
I am using the html2canvas with jsPDF to export this report to PDF file.
But the process is taking a long time, more than 11000ms.
See below the code I used:
I'm doing something wrong or really is a problem?
How I can improve the performance?
EDIT: I discovered the problem isn't toDataURL() method, but is the process to render the content onto the canvas, but, the problem continues.
The text was updated successfully, but these errors were encountered: