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
html2canvas is not able to capture a SVG in IE11. #1472
Comments
Update
Question |
@Paul-Kijtapart Hi I'm facing the same issue as well have you fixed your issue? Currently if I were to use v1.0.0-alpha.11(latest version) there won't be SVG displayed on the pdf file. |
Hi @GoodJeans, Progress Attempt Troubleshoot With Chrome:
With IE11
From the log above, unlike Chrome, IE11 fails to capture the 3 images from the SVG dom. |
@Paul-Kijtapart I see.. the alpha version that I am using does not support the SVG on internet explorer unfortunately.. guess I will have to wait for a next release. I'm actually using eKoopmans/html2pdf along with html2canvas. |
It is still not working in ie 11.Below is the Code I am using. let data = document.getElementById('contentToConvert'); |
I have the same issue and it's not working in IE 11. What I try to do is to generate the PDF file for the report page with some highchart graphs (which is svg). I am using html2canvas and jspdf. when I switch the version from html2canvas@1.0.0-alpha.10 to html2canvas@0.5.0-beta4, it can show the highchart graph, but there are others issues like layout. If I use html2canvas@1.0.0-alpha.10, all the highchart graph will be empty when generate canvas. I am looking forward to the new release with this fix. |
This is still an issue in 1.0.0-rc.1. IE11 doesn't see highcharts (svg canvas) while Chrome and Firefox do. |
Still seems to be an issue in 1.0.0-rc.3. |
Any update on this issue? |
I have updated to use 1.0.0-rc.5. but still not working. |
Any news? Last thing I need on my project is good pdfs in IE11. |
still not working in IE11 with svg. does anybody have any workaround? |
@kuldip27792 |
my teammate suggests an alternative, you can view it as an option if your PDF is not a must to generate in real-time: Step 1. Install google-chrome e.g. In that case the generated PDF will be in the same style no matter which browser you are using. |
@fiftyk i tried doing that but that also worked for chrome but not for IE11. |
@kuldip27792 we ended up launching IE11 to a stripped down page with a button just call into screen shot. Not good but enough for our client. |
@fiftyk I've tried your solution and it worked great. so what I'm doing is I'm collecting all the svg elements and rendering them to the canvas created by html2canvas with their own position values. Thanks a lot brother. |
yup, like ahmeturun, this is what I do as well. Attached is my TypeScript function to make svgs render onto the screenshot: Array.from(document.getElementsByTagName('svg')).map(svg => {
|
Specifications:
Bug reports:
Problem
html2canvas is not able to capture a SVG in IE11.
Steps to reproduce
Please see jsFiddle: https://jsfiddle.net/coolbean/ekshfuLz/17/
When I tried above in Chrome, html2canvas finished loading "1" images.
However, IE11 finishes loading "0" images.
As a result, the produced canvas is empty.
There is no error log,
so I assume that this problem might be from incompatible syntax of SVG tag.
The text was updated successfully, but these errors were encountered: