AztecOptions Class

Options for the creation of Aztec symbols by Barcode2D.CreateAztec.

public sealed class AztecOptions

Remarks

A compact Aztec symbol has 1 to 4 layers (15 × 15 to 27 × 27 modules), a full-range symbol 1 to 32 layers (19 × 19 to 151 × 151 modules). Among the sizes that satisfy these options and hold the data with the requested error correction, the symbol has the smallest one.

The sizes are numbers of modules, not the size of the image: the ModuleSize of the renderers sets how many pixels or units a module takes.

Constructors

NameDescription
AztecOptions()

AztecOptions()

AztecOptions.cs
public AztecOptions()

No documentation is available.

Properties

NameDescription
CompactGets or sets whether the symbol is compact (true), full-range (false), or the smallest of both (null, the default).
ErrorCorrectionPercentGets or sets the minimum percentage of the codewords of the symbol that are error correction codewords, from 5 to 95. The symbol also gets 3 more error correction codewords. The default is 23, which ISO/IEC 24778 recommends.
LayersGets or sets the exact number of layers, from 1 to 32 (1 to 4 for a compact symbol), or null for the smallest number that holds the data.

Gets or sets whether the symbol is compact (true), full-range (false), or the smallest of both (null, the default).

public bool? Compact { get; set; }

Property value

bool?

ErrorCorrectionPercent

AztecOptions.cs

Gets or sets the minimum percentage of the codewords of the symbol that are error correction codewords, from 5 to 95. The symbol also gets 3 more error correction codewords. The default is 23, which ISO/IEC 24778 recommends.

public int ErrorCorrectionPercent { get; set; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than 5 or greater than 95.

Remarks

The percentage is of the capacity of the symbol, as in ISO/IEC 24778: with 50, at least half of the codewords and 3 more codewords correct errors, so the data takes less than half of the symbol.

Gets or sets the exact number of layers, from 1 to 32 (1 to 4 for a compact symbol), or null for the smallest number that holds the data.

public int? Layers { get; set; }

Property value

int?

Exceptions

ArgumentOutOfRangeException
The value is less than 1 or greater than 32.

Remarks

The data must still fit with AztecOptions.ErrorCorrectionPercent. The error correction codewords fill the space the data leaves, which can be more. When AztecOptions.Compact is null, a compact symbol is used for 1 to 4 layers when the data fits in it, a full-range symbol otherwise.