Back to Devexpress

MicroQRCodeGenerator.CompactionMode Property

corelibraries-devexpress-dot-xtraprinting-dot-barcode-dot-microqrcodegenerator.md

latest2.6 KB
Original Source

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.v25.2.Core.dll

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
[DefaultValue(MicroQRCodeCompactionMode.AlphaNumeric)]
public virtual MicroQRCodeCompactionMode CompactionMode { get; set; }
vb
<DefaultValue(MicroQRCodeCompactionMode.AlphaNumeric)>
Public Overridable Property CompactionMode As MicroQRCodeCompactionMode

Property Value

TypeDefaultDescription
MicroQRCodeCompactionModeAlphaNumeric

A MicroQRCodeCompactionMode enumeration value.

|

Available values:

NameDescription
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

MicroQRCodeGenerator Class

MicroQRCodeGenerator Members

DevExpress.XtraPrinting.BarCode Namespace