html2canvas is not working in Ipad/iPhone iOS 11.2.1 and iPhone X Safari borwser
See original GitHub issueHi,
I have use html2canvas function for capturing screen shot from div its working fine on web but its not working in Ipad iOS 11.2.1 Safari browser getting blank response. I have using Ipadair2 with iOS 11.2.1 and iPhone X
Include JS Version: jQuery v1.7.1 jquery.com html2canvas v1.0.0-alpha.7
Here the HTML code:
<div id="pdfContent" class="pdfContent" style="transform-origin: left top 0px; transform: scale(1);" crossOrigin="Anonymous">
<img id="hotspotimg" src="img.jpg" cropwidth="1000" cropheight="600"/>
<div id="editor"></div>
</div>
Here the JS code:
html2canvas(document.querySelector('#pdfContent'), {useCORS: true}).then(function (canvas) {
try {
var imgageData = canvas.toDataURL("image/png");
} catch (err) {
console.log(err)
alert(err)
}
}).catch(function onRejected(error) {
alert(error);
});
I have tried multiple github solution like and other links but not working on Ipad/iPhone
Please help me:
Contact us: wagh.chetan@fxbytes.com
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:14 (2 by maintainers)
Top Results From Across the Web
html2canvas is not working in Ipad/iPhone iOS 11.2.1 Safari ...
I have use html2canvas function for capturing screen shot from div its working fine on web but its not working in Ipad iOS...
Read more >Incompatibility problem - html2Canvas in ios 15
html2canvas library is used in our js project however it leads to white screen ... Have same issue. happens only when the html...
Read more >[Solved]-html2canvas - crashing on iOS devices - appsloveworld
for iphone i get same problem, i got to fix with disabled pinch zoom in to make a image showing in screen you...
Read more >Xcode Not Opening After Updating To Macos Catalina - ADocLib
Hi I have updated my mac os to 10.15 beta then after I am facing issues to build apk so I tried flutter...
Read more >Fix html2canvas jQuery code - it crashes on iOS only
Basically, my code works perfectly on everything except iOS devices like an iPhone. The html2canvas code doesn't seem to trigger at all on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i’m having the same issue, it works fine on any desktop browser and android devices, but not in safari. I’m using cropper.js to crop an uploaded image and preview to another image template. When i use safari it draw nothing.
@JacobJohnJ … I ended up having to create a separate HTML Element and absolute position it off screen to work. I styled each element on the canvas seperately to match what I wanted the download to be. It was very annoying but I was able to get the downloads to work this way.