Aztec puts its finder in the middle, a bullseye of concentric squares, and grows outward in layers. There is no quiet zone requirement, which is why transport operators print it on tickets and boarding passes where every millimetre is spoken for.
Error correction is a percentage, not a level. The library defaults to 33 per cent of the symbol and accepts anything from 1 to 100; the standard sets the floor at 23 per cent plus three codewords.
Type Token
| Item | Value |
|---|---|
| Type token | AZTEC |
| Enum case | BarcodeType::AZTEC |
| Family | 2D |
| Standard | ISO/IEC 24778 |
| Class | \Com\Tecnick\Barcode\Type\Square\Aztec |
Input
| Item | Value |
|---|---|
| Character set | any byte sequence |
| Length | up to 3832 digits or 3067 letters in a full range symbol |
| Check | Reed-Solomon error correction at the chosen percentage |
| Extra parameters | 4 (see below) |
Extra Parameters
Appended to the type token after commas, as in AZTEC,50,A,A.
| Position | Meaning | Values | Default |
|---|---|---|---|
| 1 | error correction percentage | 1 to 100 | 33 |
| 2 | encoding hint | A automatic, B binary | A |
| 3 | symbol range | A automatic, F full range | A |
| 4 | ECI code | an ECI identifier for the character set | unset |
Examples
Mixed letters and digits
<?php
require_once __DIR__ . '/vendor/autoload.php';
$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
type: 'AZTEC',
code: 'ABCDabcd01234',
width: -4,
height: -4,
color: 'black',
padding: [0, 0, 0, 0],
)->setBackgroundColor('white');
echo $bobj->getInlineSvgCode();
Half the symbol given over to error correction
$bobj = $barcode->getBarcodeObj(
type: 'AZTEC,50,A,A',
code: 'ABCDabcd01234',
width: -4,
height: -4,
color: 'black',
padding: [0, 0, 0, 0],
)->setBackgroundColor('white');
Errors
These payloads raise \Com\Tecnick\Barcode\Exception:
| Payload | Message |
|---|---|
| `` | Empty input |
See Also
- tc-lib-barcode : the library overview.
- Rendering Options : size, colour, padding.
- Output Formats : every renderer.
- Aztec Rune : the 11 by 11 single-byte form.
- HIBC in Aztec Code : an Aztec Code carrying an HIBC data structure.
- Datamatrix : the other compact matrix format.
- API reference : the generated class documentation.