QR Code:- Adding canvas(qr code surroundings color with white) and some content on image qr code along with it and download it

After downloading qr code expected results not happening

=>the below following code for gr code

var qrcode = new QRCode(document.getElementById("qrcode"), { text: qrcode_text, width: 212, height: 212, colorDark: "#000000", colorLight: "#ffffff", correctLevel: QRCode.CorrectLevel.H });

=> the below following code for canvas

`var downloadButton = document.getElementById('QRCode_download_btn');
downloadButton.addEventListener('click', function () {

    var canvas = document.getElementById('qrcode').querySelector('canvas');
    var anchor = document.createElement('a');
    anchor.href = canvas.toDataURL('image/jpeg');
    anchor.download = fileName +'.jpeg';
    anchor.click();
});`

=>example
qr code height :- 212
qr code width:- 212

canvas height :- 500
canvas width:- 500

=> after user click on download button create canvas(background color = white) and draw qr code with respective values and some content on image