Aztec Rune

Aztec Rune in PHP: value range 0 to 255, code example and SVG output

A Rune is an Aztec symbol stripped to its smallest useful form: 11 by 11 modules carrying one byte, a number from 0 to 255 and nothing else. Annex A of the Aztec standard defines it for marking objects that need an identifier and no more.

Type Token

ItemValue
Type tokenAZTECRUNE
Enum caseBarcodeType::AZTECRUNE
Family2D
StandardISO/IEC 24778 Annex A
Class\Com\Tecnick\Barcode\Type\Square\AztecRune

Input

ItemValue
Character setdigits, read as one integer
Lengtha value from 0 to 255
CheckReed-Solomon error correction, computed by the library
Extra parametersnone

Examples

A value in the middle of the range

<?php

require_once __DIR__ . '/vendor/autoload.php';

$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
    type: 'AZTECRUNE',
    code: '125',
    width: -4,
    height: -4,
    color: 'black',
    padding: [0, 0, 0, 0],
)->setBackgroundColor('white');

echo $bobj->getInlineSvgCode();

Aztec Rune barcode encoding 125

Errors

These payloads raise \Com\Tecnick\Barcode\Exception:

PayloadMessage
256AZTECRUNE: the code must be a number between 0 and 255
12AAZTECRUNE: the code must be a number between 0 and 255

See Also