I am looking for a javascript API for generating QR codes (name, address and such) and outputting them in a printable format (png/jpeg/pdf). This seems to me to be something others before must have had a need for.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
https://drive.google.com/open?id=0B3TWIbBcUUTwcE1vV24wQnRxNGs
above is the link of js file include it in your project and write the below code in ctp file in cake php or any where you want to use. i tested it in cake php...
Maksym's solution is better than Google's library because it runs at local does not need to call Google API. also if you don't use jQuery, you can use this one at https://github.com/amanuel/JS-HTML5-QRCode-Generator
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
Another HTML5 solution is http://davidshimjs.github.io/qrcodejs/ with
IE6~10, Chrome, Firefox, Safari, Opera, Mobile Safari, Android, Windows Mobile
browser compatibilityjquery-qrcode jQuery plugin also generates QR code using HTML5 canvas element or HTML table, if canvas is not supported.
https://github.com/jeromeetienne/jquery-qrcode
Working jsFiddle demo:
http://jsfiddle.net/maxim75/YwN8p/4/