Micro QR Code
- 4 minutes to read
A Micro QR Code is a two-dimensional code. It is a more compact version of a standard QR code: a Micro QR Code can encode up to 35 numeric characters or 21 alphanumeric characters, enough to store a product ID or a short URL. In comparison, a standard QR code can contain up to 7,089 characters.
Micro QR Codes are often used in industries such as electronics, medical devices, and retail, where space-efficient labeling is essential.
Refer to the following article for more information: Micro QR Code.
Version Comparison
Version | Size (Modules) | Numeric Capacity | Alphanumeric Capacity | Binary Capacity (Bytes) | Error Correction Levels | Use Case |
---|---|---|---|---|---|---|
M1 | 11×11 | 5 characters | N/A | N/A | Detection only (D) | Ideal for minimal numeric data in space-constrained environments. |
M2 | 13×13 | 10 characters | 6 characters | 4 bytes | Level L (7%) | Small data capacity with basic error correction in tight spaces. |
M3 | 15×15 | 23 characters | 14 characters | 9 bytes | Level L (7%), Level M (15%) | Moderate data capacity with more flexible error correction and space requirements. |
M4 | 17×17 | 35 characters | 21 characters | 15 bytes | Level L (7%), Level M (15%), Level Q (25%) | Higher data capacity with flexible error correction while maintaining a compact size. |
Add a Barcode to a Report
To add a barcode to a report, follow these steps:
Drag the XRBarCode item from the DX.24.2: Report Controls tab and drop it onto the report.
Set the
XRBarCode
control’s Symbology property to Micro QR Code (an object of the MicroQRCodeGenerator type).Specify common barcode properties and properties specific to the Micro QR Code.
Specific Properties
- CompactionMode
- Gets or sets whether the barcode contains a number, an alphanumeric string, or a byte array.
- ErrorCorrectionLevel
- Specifies the amount of redundancy built into the Micro QR code to compensate for calculation errors.
- IncludeQuietZone
- Gets or sets whether to add a blank space around the Micro QR code to help separate the Micro QR code from neighboring elements.
- Version
- Gets or sets the barcode’s version.
Runtime Example
The following code snippet generates a Micro QR Code barcode and specifies its properties:
using System.Collections.Generic;
using System.Drawing.Printing;
using DevExpress.XtraPrinting.BarCode;
using DevExpress.XtraReports.UI;
public XRBarCode CreateMicroQRCodeBarCode(string BarCodeText) {
// Create a barcode control.
XRBarCode barCode = new XRBarCode();
// Set the barcode's type to QRCode.
barCode.Symbology = new MicroQRCodeGenerator();
// Adjust the barcode's main properties.
barCode.Text = BarCodeText;
barCode.Width = 150;
barCode.Height = 150;
// If the AutoModule property is set to false, uncomment the next line.
barCode.AutoModule = true;
// barcode.Module = 3;
// Adjust the properties specific to the barcode type.
((MicroQRCodeGenerator)barCode.Symbology).CompactionMode = MicroQRCodeCompactionMode.AlphaNumeric;
((MicroQRCodeGenerator)barCode.Symbology).ErrorCorrectionLevel = MicroQRCodeErrorCorrectionLevel.L;
((MicroQRCodeGenerator)barCode.Symbology).Version = MicroQRCodeVersion.AutoVersion;
return barCode;
}
The code example below shows how to create a report with a Micro QR Code barcode: