Reputation: 166
Is it possible to generate a QR Code inside of the browser (across the popular browsers)? Ideally using JS and CSS, if HTML5 is required that is a possibility as well.
If so, does anyone know of a good script to do so?
Upvotes: 3
Views: 4857
Reputation: 366
Fully customizable QRCode library on pure JavaScript github.com/Intosoft/custoqr
Upvotes: 0
Reputation: 671
Well there are plenty of options and solutions out there but I strongly recommend this one https://larsjung.de/jquery-qrcode/ where by it's very easy to utilize and understand. :)
Furthermore, it also comes with several good options such as input image logo, color settings, size settings and many more. Feel free to explore. :)
Upvotes: 1
Reputation: 51735
In addition to the canvas library @Maxym mentioned, you could use jquery.qrcode.js. It doesn’t use a canvas, so it’s more compatible.
(Actually, it uses a big table with one cell for each pixel of the QR code.)
Upvotes: 3
Reputation: 11906
Actually yes, using Canvas you can draw QR code, and it can be saved as image. Look here - looks like pure HTML5 implementation, you can investigate its scripts qrcode.js and qrcanvas.js, as well as you can use it under the MIT license.
As it is written on that page, it won't work on IE, but you can use emulator there.
There is also another article, how to generate QR code using jQuery plugin, but they just use online generators (Kaywa & University of Bath services). This way is simpler and should work on all browsers ;)
Upvotes: 6