Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download qrcode image #115

Open
karvox opened this issue Jul 17, 2018 · 3 comments
Open

Download qrcode image #115

karvox opened this issue Jul 17, 2018 · 3 comments

Comments

@karvox
Copy link

karvox commented Jul 17, 2018

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
Copy link

Hello Karvox,

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

@karvox
Copy link
Author

karvox commented Sep 28, 2018

Hello anoop-hiteshi,

Not yet!

@RajonKobir
Copy link

RajonKobir commented Dec 6, 2020

// 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants