7

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

Include JS Version:

jQuery v1.7.1 jquery.com
html2canvas 0.4.1 <http://html2canvas.hertzen.com>
html2canvas 0.5.0-alpha1 <http://html2canvas.hertzen.com>

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 enter link description here and other links but not working on Ipad/iPhone

Please help me:

0 Answers0