QR Codes


When we generate QR codes we simply use Google's chart API to deliver the image which is shown in a <img> tag.

TheĀ  API is available at http://chart.apis.google.com/chart
Heres and example showing the QR code for http://www.prama.net/services:

<img src="http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=http://www.praqma.com/giveaways">

  • Set the chart type (cht) to qr
  • Set the chart size (chs) to what ever you like
  • Set the link (chl) to the URL you want to generate a QR code for
You see the result below - try to scan it!











You can even use the QR code to embed data such as a vCard if you encode it:

BEGIN:VCARD
VERSION:3.0
N:Kruse;Lars
FN:Lars Kruse
ORG:Praqma
TITLE:Partner & Co-founder
TEL;TYPE=WORK,VOICE:+45 20 87 25 30
ADR;TYPE=WORK:;;Allerod Stationsvej 4;Allerod;DK;3450;Denmark
LABEL;TYPE=WORK:;;Allerod Stationsvej 4;Allerod;DK;3450;Denmark
EMAIL;TYPE=PREF,INTERNET:lak@praqma.com REV:20121102T195043Z END:VCARD
After the vCard is URLencoded and added as the chl parameter it looks like this:
<img src="http://chart.apis.google.com/chart?cht=qr&amp;chs=250x250&amp; chl=BEGIN%3AVCARD%0AVERSION%3A3.0%0AN%3AKruse%3BLars%0AFN%3ALars%20Kruse% 0AORG%3APraqma%0ATITLE%3APartner%20%26%20Co-founder%0ATEL%3BTYPE%3DWORK%2 CVOICE%3A%2B45%2020%2087%2025%2030%0AADR%3BTYPE%3DWORK%3A%3B%3BAllerod%20 Stationsvej%204%3BAllerod%3BDK%3B3450%3BDenmark%0ALABEL%3BTYPE%3DWORK%3A% 3B%3BAllerod%20Stationsvej%204%3BAllerod%3BDK%3B3450%3BDenmark%0AEMAIL%3B TYPE%3DPREF%2CINTERNET%3Alak%40praqma.com%0AREV%3A20121102T195043Z%0AEND% 3AVCARD">
Comments