Javascript API for generating QR codes

I am looking for a javascript API to generate QR codes (name, address, etc.) and output them in printable format (png / jpeg / pdf). This seems to me to be something else that was previously needed.

+6
source share
5 answers

Google has a QR code generator as part of their Chart tools that you can use here.

http://code.google.com/apis/chart/infographics/docs/qr_codes.html

+6
source

jquery-qrcode The jQuery plugin also generates QR code using an HTML5 canvas element or an HTML table if canvas is not supported.

https://github.com/jeromeetienne/jquery-qrcode

$('#test').qrcode({ width: 120, height: 120, text: "https://github.com/jeromeetienne/jquery-qrcode"}); 

enter image description here

Working jsFiddle demo:

http://jsfiddle.net/maxim75/YwN8p/4/

+18
source

The Maksym solution is better than the Google library, since it runs on the local computer, you do not need to call the Google API. also, if you are not using jQuery, you can use it at https://github.com/amanuel/JS-HTML5-QRCode-Generator

+4
source

Another HTML5 solution http://davidshimjs.imtqy.com/qrcodejs/ with IE6~10, Chrome, Firefox, Safari, Opera, Mobile Safari, Android, Windows Mobile browser compatibility

+1
source

https://drive.google.com/open?id=0B3TWIbBcUUTwcE1vV24wQnRxNGs

above, the js file link includes it in your project and writes the code below in the ctp file in the php of the cake or anywhere you want to use it. I tested it in php cake ...

 <-- including the file.... <?php echo $this->Html->script('jquery.qrcode.min.js')?> <div style='padding:100px''><img id="demo" style='width: 100px,height: 100px'></div> <script type="text/javascript">jQuery("#demo").qrcode({text: "HEllo World!"});</script> 
-1
source

Source: https://habr.com/ru/post/895918/


All Articles