dom-to-image icon indicating copy to clipboard operation
dom-to-image copied to clipboard

Doesn't work on ios device

Open abdullahknz opened this issue 7 years ago • 10 comments

I'm using dom-to-image in ionic 2 app and this is my typescript code. When I trying in chrome it is working but in ios device not working.

ERROR: oops, something went wrong! [object Event] (My console log)

public save() {

var node = document.getElementById('image')

 domtoimage.toPng(node)
.then(function (dataUrl) {
  
    imagedata = dataUrl;
    console.log(imagedata);
   
})
.catch(function (error) {
  
    console.error('oops, something went wrong!', error);
});
this.isCropped = true;

}

abdullahknz avatar Jul 12 '17 13:07 abdullahknz

I have the same problem. SecurityError (DOM Exception 18): The operation is insecure.

alanhe421 avatar Jul 23 '17 06:07 alanhe421

Indeed, it does not work on iOS. In this comment I explained the workaround I use to make screen shots on iOS.

bsautel avatar Jul 24 '17 11:07 bsautel

Thanks for your help. But html2canvas have blurry problem and it is not enough for me.

abdullahknz avatar Jul 24 '17 11:07 abdullahknz

Ok, I am using it to make some screen shots of very small cards and html2canvas renders them rather well on iOS 10. I assume you have some more advanced use-cases. Sorry, I have no other workaround for you. 😞

bsautel avatar Jul 24 '17 12:07 bsautel

Thank you for your interest 👍

abdullahknz avatar Jul 24 '17 12:07 abdullahknz

Same problem for me. html2canvas can't correctly process svg charts made with d3.js.

roman-karpovich avatar Jul 28 '17 12:07 roman-karpovich

Same problem...

sydtpt avatar Sep 14 '17 20:09 sydtpt

Same problem...

zeeshanjan82 avatar Jul 10 '18 02:07 zeeshanjan82

Same problem...

tomdogxu avatar May 20 '19 01:05 tomdogxu

谢谢你的帮助。但是html2canvas有模糊的问题,对我来说还不够。

现在有对应的解决方案吗

lgc2007 avatar May 12 '20 11:05 lgc2007