A QR Code that contains this article's URL can be seen below for an example:
Figure 1.
Now lets see a simple example to create a 2D QR Code with the help of Google chart API. In this example we will display this article URL in QR code. This is the URL we just need to get the 2D QR code image:
chs=300x300 means we need 300x300 size of image.
cht=qr means our chart type is QR code.
chld=|3 sets the margin around the matrix for styling purpose. It is optional if you do not provide it default will be 4. See figure 2 the red line represents the margin.
chl=http%3A%2F%2Fmmabdullah.blogspot.com%2F2011%2F09%2Fsimple-steps-to-get-2d-qr-code.html URL encoded URL or data you want to see in the QR Code.
Figure 2.
OK this was about the few parameters you can see details here. And Google has also provided a chart wizard and it is really useful. Now we only have the URL to get the image how to show it on page? Here it is just give this URL as your image source in image tag.
I hope this will help some one.
No comments:
Post a Comment