Skip to main content
All docs
V24.2

MicroQRCodeGenerator.CompactionMode Property

Gets or sets whether the barcode contains a number, an alphanumeric string, or a byte array.

Namespace: DevExpress.XtraPrinting.BarCode

Assembly: DevExpress.Printing.v24.2.Core.dll

Declaration

[DefaultValue(MicroQRCodeCompactionMode.AlphaNumeric)]
public virtual MicroQRCodeCompactionMode CompactionMode { get; set; }

Property Value

Type Default Description
MicroQRCodeCompactionMode AlphaNumeric

A MicroQRCodeCompactionMode enumeration value.

Available values:

Name Description
Numeric

Numeric data. Up to 35 digits.

AlphaNumeric

A combination of letters, numbers, and special characters. Up to 21 characters.

Byte

Binary data. Up to 15 bytes.

Remarks

If the data encoded in numeric or alphanumeric mode contains invalid characters for the Micro QR Code barcode, switch to byte mode to interpret the data as a sequence of bytes and use this sequence to encode the barcode.

Use the barcode’s CompactionMode property to enable Byte mode. To specify the barcode’s binary data, do one of the following:

  • Transform the data into a sequence of bytes and assign the sequence to the barcode’s BinaryData property.
  • Assign the data to the barcode’s Text property to automatically use UTF-8 to convert the data into a sequence of bytes.
See Also