New to Telerik Reporting? Start a free 30-day trial

Defines the MaxiCode encoder class. MaxiCode is a fixed-size 2D barcode symbology using hexagonal modules arranged around a central bullseye pattern. Primarily used on UPS shipping labels.

For Modes 2 and 3, the UPS Structured Carrier Message (SCM) header [)>\x1E01\x1D96 is automatically prepended to the secondary data when not already present. The Value property should contain the tracking fields separated by GS (0x1D), ending with RS (0x1E) + EOT (0x04).

Definition

Namespace:Telerik.Reporting.Barcodes

Assembly:Telerik.Reporting.dll

Syntax:

C#
public class MaxiCodeEncoder : Encoder2D

Inheritance: objectEncoderEncoder2DMaxiCodeEncoder

Inherited Members Encoder.ToString()

Example:

csharp
// UPS domestic label (Mode 2 - US shipment)
barcode.Encoder = new MaxiCodeEncoder
{
    Mode = MaxiCodeMode.Mode2,
    PostalCode = "152382802",
    CountryCode = 840,
    ServiceClass = 001
};
barcode.Value = "1Z00004951\u001dUPSN\u001d06X610\u001d159\u001d1234567\u001d1/1\u001d\u001dY\u001d634 ALPHA DR\u001dPITTSBURGH\u001dPA\u001e\u0004";

// International shipment (Mode 3)
barcode.Encoder = new MaxiCodeEncoder
{
    Mode = MaxiCodeMode.Mode3,
    PostalCode = "EC2A1N",
    CountryCode = 826,
    ServiceClass = 001
};
barcode.Value = "1Z12345678\u001dUPSN\u001d06X610\u001d159\u001d1234567\u001d1/1\u001d\u001dY\u001d10 DOWNING ST\u001dLONDON\u001e\u0004";

// General-purpose data (Mode 4)
barcode.Encoder = new MaxiCodeEncoder { Mode = MaxiCodeMode.Mode4 };
barcode.Value = "Hello MaxiCode";

Constructors

Initializes a new instance of the MaxiCodeEncoder class.

C#
public MaxiCodeEncoder()

Properties

Gets or sets the ISO 3166 numeric country code for Modes 2 and 3. Mode 2 requires country code 840 (United States). Mode 3 accepts any valid 3-digit country code (e.g. 826 for UK). Ignored for Modes 4, 5, and 6.

C#
public int CountryCode { get; set; }

Gets or sets the MaxiCode encoding mode. Mode 2: Structured Carrier Message with numeric postal code (US only). Mode 3: Structured Carrier Message with alphanumeric postal code (international). Mode 4: Standard Symbol, Standard Error Correction. Mode 5: Standard Symbol, Enhanced Error Correction. Mode 6: Reader programming.

C#
public MaxiCodeMode Mode { get; set; }

Gets or sets the postal code for Modes 2 and 3. Mode 2 requires exactly 9 numeric digits (e.g. "152382802"). Mode 3 requires exactly 6 alphanumeric characters (e.g. "EC2A1N"). Ignored for Modes 4, 5, and 6.

C#
public string PostalCode { get; set; }

Gets or sets the 3-digit service class for Modes 2 and 3. Represents the type of service (e.g. 001 for standard). Ignored for Modes 4, 5, and 6.

C#
public int ServiceClass { get; set; }