QR Code Specifications

Size of the QR Code is determined by:

  1. Length of the data to be encoded
  2. Error correction level (L, M, Q, H)
  3. Pixels per block
  4. Margin (White space around QR code)

Following options can be provided to the user w.r.t the text embedded in the QR code image

  1. Text to be embedded
  2. Font Name
  3. Font Size
  4. Text Tracking(To control spacing between characters)

Following options can be provided to the user w.r.t the QR code image

  1. Colour model of the image(RGB/CMYK)
  2. Border size
  3. File format of the QR image


ParameterDescriptionMandatory/
Optional
Values SetDefault Value
dataData to be encoded as QR imageMandatory--
errorCorrectionLevelError correction level for the generated QR codeOptionalL, M, Q, HH
pixelsPerBlockNumber of pixels to be painted per bit-matrix encoded valueOptional-2
marginNumber of pixels as margin for QR codeOptional-3
textText to be embedded in QR imageOptional--
fontNameFont name of the textOptional-Verdana
fontSizeFont size of the textOptional-11
trackingTracking value to be set for TextAttribute.TRACKINGOptional-0.1 to 0.3 recommended0.1
colourModelColour model of the QR imageOptionalRGB, CMYKRGB
borderSizeQR image border size in pixelsOptional-1
imageFormatFile format of the QR imageOptional-PNG


Sample Values:

{
  "qrSpec": {
    "data": "http://www.sunbird.org/dial/2A42UH",
    "errorCorrectionLevel": "H",
    "pixelsPerBlock": 3,
    "margin": 3
  },
  "textSpec": {
    "text": "2A42UH",
    "fontName": "Verdana",
    "fontSize": 12,
    "tracking": -0.1
  },
  "imageSpec": {
    "imageFormat": "png",
    "colourModel": "CMYK",
    "borderSize": 2
  }
}