如果就是想要普通的二维码生成,google apis已经做好了。 我们甚至都不需要去编码,直接url方式引用即可。 效果如下: http://image57.360doc.com/DownloadImg/2012/12/1619/28960836_1
Google Chart Tools: InfographicsYou can create a QR code on the fly with a URL GET request. Table of Contents
OverviewQR codes are a popular type of two-dimensional barcode. They are also known as hardlinks or physical world hyperlinks. QR Codes store up to 4,296 alphanumeric characters of arbitrary text. This text can be anything, for example URL, contact information, a telephone number, even a poem! QR codes can be read by an optical device with the appropriate software. Such devices range from dedicated QR code readers to mobile phones. SyntaxRoot URL: QR code requests support the following URL query parameters after the ? in the root URL:
Example:
QR Code Details [Optional Reading]Here is a little more about how QR codes work; you don't necessarily need to know this to be able to generate a QR code. QR codes are squares, with an equal number of rows and columns. There are a fixed set of QR code sizes: from 21 to 177 rows/columns, increasing in steps of four. Each configuration is called a version. The more rows/columns, the more data the code can store. Here is a summary of the versions:
Don't confuse the number of rows and columns with size of the QR code image. The pixel size of the code is determined using The API will determine which version to use, based on the amount of data you provide. The appropriate QR code version will be returned depending on the number of characters you provide. For example, if you provide 55 alphanumeric characters, you will get a Version 3 QR code, although this can change if you specify an error correction (EC) level explicitly using the Before generating your QR code, consider what kind of device is used to read your code: the best QR code readers are able to read Version 40 codes; mobile devices might only be able to read up to Version 4. The following table summarizes the characteristics of a few different versions:
Further Information and StandardsThe QR code standard is trademarked by Denso Wave, Inc. The ISO sells the English language specification on their site. The Japanese version is free. QR code standards are approved as:
QR code reader software is available from many sources. Google offers a QR Code reader library, Zebra Crossing (ZXing), for free. See http://code.google.com/p/zxing/ for details. See Barcode Contents for a rough guide to standard encoding of information in barcodes |
|