I was wondering how it's possible to download the JQuery generated QR code or convert to a downloadable image (png/jpeg) using javascript.
I tried what was here: Capture HTML Canvas as gif/jpg/png/pdf? But no success. I think it's related to the output. There is a table and canvas output, but both do not give the image data...
Here is my code:
<script src="js/jquery-1.3.2.js"></script>
<script type="text/javascript" src="js/jquery.qrcode.js"></script>
<script type="text/javascript" src="js/qrcode.js"></script>
<div id="output"></div>
<script>
jQuery(function(){
jQuery('#output').qrcode("http://");
})
var canvas = document.getElementById("output");
var img = canvas.toDataURL("image/png");
document.write('<img src="'+img+'"/>');
</script>
Also I was hoping to surround the QR Code with a white background (Adding rows and columns within the div) before converting to image to aid the detection (so that the background is also included in the image).
Any help is appreciated...