Plugins You can find out about all the publicly available Grails plugins.

QRCode Plugin

  • Tags: utility, generate, ui
  • Latest: 0.1.4
  • Last Updated: 02 July 2013
  • Grails version: 2.0 > *
3 votes
compile ":qr-code:0.1.4"

 Documentation  Source  Issues


Allows your Grails application to create QRCode image which you can put your logo to this image


grails install-plugin qr-code



Grail plugin project - Create QRCode and can put your logo to QRCode image

The plugin support both of service and taglib.

About function:

  • Create qrcode for a text
  • Create qrcode for a contact - MECARD (Please see:
  • Create qrcode follow google api (Please see:
And In each case you can put your logo in this qrcode image by link or by base64 string or object

About technique:

  • You can use service for customize you business functions. It supported you generate qrcode image for many types that you can do. etc.
    • You can write down your disk
    • You can get BufferedImage
    • You also can get Base64 string as well
  • About logo image, It also support system path, URL or Base64 String as well,


User Information

Map information = [:]
def contactInfo = "MECARD:N:Tung,Ly;ADR:76 9th Avenue, 4th Floor, New York, NY 10011;"
                + "TEL:+84906667100;EMAIL:[email protected];;"
information.put("chs", "250x250")
information.put("cht", "qr")
information.put("chl", contactInfo)
information.put("chld", "H|1")
information.put("choe", "UTF-8")
QRCodeService.createQRCode(information, "/local/logo.jpg", "/local", "qrcode.png")
def bytes = new URL("").getBytes()
def data = bytes.encodeBase64().toString()
QRCodeService.createQRCodeAndLogoBase64(information, data, "/local", "google.png" )

Contact information

def contactInfos = [:]
contactInfos.put("FIRSTNAME", "Tung")
contactInfos.put("LASTNAME", "Ly")
contactInfos.put("ADR", "124 Cao Xuan Duc P12 Q8 HCM")
contactInfos.put("TEL", "0906667100")
contactInfos.put("TEL-AV", "+84906667100")
contactInfos.put("EMAIL", "[email protected]")
contactInfos.put("URL", "")
contactInfos.put("BDAY", "1985/01/01")

QRCodeService.createContactQRCode(contactInfos, "", "/local", "qrcode2.png")

def bytes = new URL("").getBytes()
def data = bytes.encodeBase64().toString()
QRCodeService.createContactQRCodeAndLogoBase64(contactInfos, data, "/local", "ibm.png" )

TagLib using

<qrcode:text>Hello QRCode Plugin for Grails</qrcode:text>
<qrcode:text logoLink=""> 
  Hello QRCode Plugin for Grails
<qrcode:text logoLink="">

<qrcode:google information="${information}" /> <qrcode:google information="${information}" logoLink="" />

<qrcode:contact contactInfos="${contactInfos}" /> <qrcode:contact contactInfos="${contactInfos}" logoLink=""/>

<qrcode:contact contactInfos="${contactInfos}" logoLink="~/Pictures/Google.png"/>

<qrcode:contact contactInfos="${contactInfos}" logoBase64="/9j/4AAQSk...SyCNxA6BP/9k="/>