Version

Configuring QR Code

The QR (Quick Response) barcode symbology is a matrix (or two-dimensional) code, readable by QR scanners, mobile phones with a camera, and smartphones. This barcode symbology is one of the most popular types of two-dimensional barcodes, as its content can be decoded at high speed.

The code consists of an array of black square modules arranged in an overall square pattern, including a unique finder pattern located at three corners of the symbol. Module dimensions are user-specified to enable symbol production by a wide variety of techniques.

The following properties are specific to the UltraQRCodeBarcode symbology.

Error Correction Level

QR Code has an error correction feature to restore the encoded data if the barcode is damaged or dirty. The user can choose from four error correction levels in accordance with the use case which are set through UltraQRCodeBarcode control’s ErrorCorrectionLevel property.

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
    .Data = "QR Code",
    .ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.Medium
}
Me.Controls.Add(barcodeQR)

In C#:

var barcodeQR = new UltraQRCodeBarcode
{
    Data = "QR Code",
    ErrorCorrectionLevel = QRCodeErrorCorrectionLevel.Medium
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 06.png

Size Version

Each size version has a different number of modules (the module refers to the black and white modules that make up the QR code matrix):

  • Undefined – this size version is specific to the UltraQRCodeBarcode and internally calculates the smallest version that accommodates the data;

  • Version1 - 21x21 modules;

  • Version40 – 177x177 modules.

The size version of the UltraQRCodeBarcode control is set through its SizeVersion property:

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
    .Data = "Infragistics",
    .SizeVersion = SizeVersion.Version1
}
Me.Controls.Add(barcodeQR)

In C#:

var barcodeQR = new UltraQRCodeBarcode
{
  Data = "Infragistics",
  SizeVersion = SizeVersion.Version1
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 01.png

Encoding Mode

QR Code is capable of encoding large numbers of characters using compaction depending on the types of the Data characters. The symbology can also encode JIS Kanji characters by setting EncodingMode to Kanji (only Kanji characters are encoded).

Note
Note:

The current version of the UltraQRCodeBarcode does not support platform specific characters (encoded with 4 bytes).

When the UltraQRCodeBarcode control has set encoding mode to Undefined, the control internally switches between modes in order to achieve the most efficient compaction for the type of the characters’ data.

You can explicitly set the compaction mode for the UltraQRCodeBarcode control’s data by its EncodingMode property:

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
    .Data = "123",
    .EncodingMode = EncodingMode.Numeric
}
Me.Controls.Add(barcodeQR)

In C#:

var barcodeQR = new UltraQRCodeBarcode
{
  Data = "123",
  EncodingMode = EncodingMode.Numeric
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 05.png

Extended Channel Interpretation Number

The UltraQRCodeBarcode control supports ECI – this means that the control can encode data from character sets other than the default one (ISO/IEC 8859-1). The ECI code is set through the UltraQRCodeBarcode control’s EciNumber property.

Refer to the table at the bottom of the topic, containing the supported ECI values and their corresponding character sets. Note that when EciNumber is set to -1 (its default value), the character values and assignments are associated with the default ECI and the ECI protocol is not used in the data encoding. Note that the UltraQRCodeBarcode control encodes only characters of the specified character set.

Assume that the data to be encoded is in Greek, using character set ISO/IEC 8859-7 (ECI 000009):

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
  .EciNumber = 9,
  .Data = "ΑΒΓΔΕ",
  .EciHeaderDisplayMode = HeaderDisplayMode.Show
}
Me.Controls.Add(barcodeQR)

In C#:

var barcodeQR = new UltraQRCodeBarcode
{
    EciNumber = 9,
    Data = "ΑΒΓΔΕ",
    EciHeaderDisplayMode = HeaderDisplayMode.Show
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 07.png

FNC1 mode

FNC1 mode is used to specify the format of the encoded data. You can choose the Gs1 mode to designate that the data is formatted in accordance with the GS1 General Specifications or Industry mode for data formatted in accordance with specific industry application previously agreed upon by AIM Inc. FNC1 mode applies to the entire symbol and is not affected by subsequent mode indicators.

The mode is set through UltraQRCodeBarcode control’s Fnc1Mode property.

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
  .Data = "(15)970331",
  .Fnc1Mode = Fnc1Mode.Gs1
}
Me.Controls.Add(barcodeQR)

In C#:

var barcodeQR = new UltraQRCodeBarcode
{
  Data = "(15)970331",
  Fnc1Mode = Fnc1Mode.Gs1
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 02.png

For the GS1 General Specification codes, see the table at the bottom of this article.

Application Indicator

The application indicator property value is used when UltraQRCodeBarcode control’s Fnc1Mode property is set to Industry. It identifies the relevant specification by AIM Inc.

Note
Note:

UltraQRCodeBarcode does not support Structured Append mode and Micro QR Code format. The features will be implemented in the future versions of the control.

Sample Images With Code Declaration:

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
  .Data = "http://ko.infragistics.com"
}
Me.Controls.Add(barcodeQR)

In C#:

var barcodeQR = new UltraQRCodeBarcode
{
  Data = "http://ko.infragistics.com"
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 03.png

In Visual Basic:

Dim barcodeQR As New UltraQRCodeBarcode With
{
  .Data = "愛",
  .EncodingMode = EncodingMode.Kanji
}
Me.Controls.Add(barcodeQR)

In C#:

var barcode = new UltraQRCodeBarcode
{
    Data = "愛",
    EncodingMode = EncodingMode.Kanji
};
this.Controls.Add(barcodeQR);
xamBarcode Adding QR Code 08.png

Supported ECI Numbers

ECI Number ISO Character Set

0

CP 437

1

ISO-8859-1

2

CP 437

3

ISO-8859-1

4

ISO-8859-2

5

ISO-8859-3

6

ISO-8859-4

7

ISO-8859-5

8

ISO-8859-6

9

ISO-8859-7

10

ISO-8859-8

11

ISO-8859-9

13

ISO-8859-11

15

ISO-8859-13

17

ISO-8859-15

20

Shift JIS

21

Windows-1250

22

Windows-1251

23

Windows-1252

24

Windows-1256

25

UTF-16

26

UTF-8

27

ISO-646-US

28

Big5

29

GB 2312

30

KSC-5601