jeromeetienne / jquery-qrcode

qrcode generation standalone (doesn't depend on external services)
http://blog.jetienne.com/blog/2011/04/07/jquery-qrcode/
MIT License
4.85k stars 2.5k forks source link

Download qrcode image #115

Open karvox opened 6 years ago

karvox commented 6 years ago

How to do download qrcode image after to render?

When render: "canvas" I get this HTML code:

untitled1

When render: "table" I get this code:

untitled

anoop-hiteshi commented 6 years ago

Hello Karvox,

I am in same problem. do you get any solution. if so please let me know this possible.

karvox commented 6 years ago

Hello anoop-hiteshi,

Not yet!

RajonKobir commented 3 years ago

// download button Download

// download QR Code Image as JPG var download_button = document.getElementById('download_button'); download_button.addEventListener('click', function (e) { // taking the created canvas element of the QR Code var canvas = document.getElementsByTagName('canvas')[0]; if(canvas){ var tmpJPG = canvas.toDataURL("image/jpg"); download_button.href = tmpJPG; }else{ e.preventDefault(); alert('no qr code'); } }); // for more on skype: +8801750988184