Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
Problems downloading image in IOS versions with canvas JS

I am trying to download an image using the html2canvas.min.js canvas library, it works on all devices except IOS, I have used some methods but I have the same issue on IOS, on IOS it just shows me a blank screen. JS

function downloadURI(uri, name) {
    var link = document.createElement('a');
    link.href = uri;
    link.download = name;
    link.click();
    console.log(link);
}

function DownloadAsImage() {
    var element = document.querySelector("#tarjetaqrdiv");
    html2canvas(element, {
        allowTaint: true,
        useCORS: true,
        backgroundColor: null,
        scale: 1,
        scrollX: 0,
        scrollY: -window.scrollY,
        // width: 2,
        // height: 2,
    }).then(function(canvas) {
        var myImage = canvas.toDataURL("image/png");
        downloadURI(myImage, "membresia-bet-qr.png");
    });
}

HTML

<div id="tarjetaqrdiv" >
   <!-- contenido -->
</div><div class="footer_bton_qr">
<input type="button" id="descargarimagen" name="descargarimagen" value="Descargar" onclick="DownloadAsImage()"></div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!