Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\QrCode
File: Data.php line 40
Symbol tables for the QrCode Barcode type class.
Only the tables ISO/IEC 18004 states without a rule that generates them are held here. The codeword capacity of Table 1, the alignment pattern positions, the format information of Table C.1, the version information of Table D.1 and the data mask patterns of Table 10 all follow from a stated rule and are computed in Encode.
Tags
- since: 2026-09-02
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2015-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-barcode
Constants
ALIGN_CENTRES
File: Data.php line 210
public array<int, array<int, int>> ALIGN_CENTRES = [1 => [], 2 => [6, 18], 3 => [6, 22], 4 => [6, 26], 5 => [6, 30], 6 => [6, 34], 7 => [6, 22, 38], 8 => [6, 24, 42], 9 => [6, 26, 46], 10 => [6, 28, 50], 11 => [6, 30, 54], 12 => [6, 32, 58], 13 => [6, 34, 62], 14 => [6, 26, 46, 66], 15 => [6, 26, 48, 70], 16 => [6, 26, 50, 74], 17 => [6, 30, 54, 78], 18 => [6, 30, 56, 82], 19 => [6, 30, 58, 86], 20 => [6, 34, 62, 90], 21 => [6, 28, 50, 72, 94], 22 => [6, 26, 50, 74, 98], 23 => [6, 30, 54, 78, 102], 24 => [6, 28, 54, 80, 106], 25 => [6, 32, 58, 84, 110], 26 => [6, 30, 58, 86, 114], 27 => [6, 34, 62, 90, 118], 28 => [6, 26, 50, 74, 98, 122], 29 => [6, 30, 54, 78, 102, 126], 30 => [6, 26, 52, 78, 104, 130], 31 => [6, 30, 56, 82, 108, 134], 32 => [6, 34, 60, 86, 112, 138], 33 => [6, 30, 58, 86, 114, 142], 34 => [6, 34, 62, 90, 118, 146], 35 => [6, 30, 54, 78, 102, 126, 150], 36 => [6, 24, 50, 76, 102, 128, 154], 37 => [6, 28, 54, 80, 106, 132, 158], 38 => [6, 32, 58, 84, 110, 136, 162], 39 => [6, 26, 54, 82, 110, 138, 166], 40 => [6, 30, 58, 86, 114, 142, 170]]
AN_CHARS
File: Data.php line 145
public string AN_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
COUNT_BITS
File: Data.php line 112
public array<int, array<int, int>> COUNT_BITS = [[10, 9, 8, 8], [12, 11, 16, 10], [14, 13, 16, 12]]
COUNT_GROUP_MAX
File: Data.php line 123
public array<int, int> COUNT_GROUP_MAX = [9, 26, 40]
ECC_BLOCKS
File: Data.php line 159
public array<int, array<int, array{int, int}>> ECC_BLOCKS = [1 => [[7, 1], [10, 1], [13, 1], [17, 1]], 2 => [[10, 1], [16, 1], [22, 1], [28, 1]], 3 => [[15, 1], [26, 1], [18, 2], [22, 2]], 4 => [[20, 1], [18, 2], [26, 2], [16, 4]], 5 => [[26, 1], [24, 2], [18, 4], [22, 4]], 6 => [[18, 2], [16, 4], [24, 4], [28, 4]], 7 => [[20, 2], [18, 4], [18, 6], [26, 5]], 8 => [[24, 2], [22, 4], [22, 6], [26, 6]], 9 => [[30, 2], [22, 5], [20, 8], [24, 8]], 10 => [[18, 4], [26, 5], [24, 8], [28, 8]], 11 => [[20, 4], [30, 5], [28, 8], [24, 11]], 12 => [[24, 4], [22, 8], [26, 10], [28, 11]], 13 => [[26, 4], [22, 9], [24, 12], [22, 16]], 14 => [[30, 4], [24, 9], [20, 16], [24, 16]], 15 => [[22, 6], [24, 10], [30, 12], [24, 18]], 16 => [[24, 6], [28, 10], [24, 17], [30, 16]], 17 => [[28, 6], [28, 11], [28, 16], [28, 19]], 18 => [[30, 6], [26, 13], [28, 18], [28, 21]], 19 => [[28, 7], [26, 14], [26, 21], [26, 25]], 20 => [[28, 8], [26, 16], [30, 20], [28, 25]], 21 => [[28, 8], [26, 17], [28, 23], [30, 25]], 22 => [[28, 9], [28, 17], [30, 23], [24, 34]], 23 => [[30, 9], [28, 18], [30, 25], [30, 30]], 24 => [[30, 10], [28, 20], [30, 27], [30, 32]], 25 => [[26, 12], [28, 21], [30, 29], [30, 35]], 26 => [[28, 12], [28, 23], [28, 34], [30, 37]], 27 => [[30, 12], [28, 25], [30, 34], [30, 40]], 28 => [[30, 13], [28, 26], [30, 35], [30, 42]], 29 => [[30, 14], [28, 28], [30, 38], [30, 45]], 30 => [[30, 15], [28, 29], [30, 40], [30, 48]], 31 => [[30, 16], [28, 31], [30, 43], [30, 51]], 32 => [[30, 17], [28, 33], [30, 45], [30, 54]], 33 => [[30, 18], [28, 35], [30, 48], [30, 57]], 34 => [[30, 19], [28, 37], [30, 51], [30, 60]], 35 => [[30, 19], [28, 38], [30, 53], [30, 63]], 36 => [[30, 20], [28, 40], [30, 56], [30, 66]], 37 => [[30, 21], [28, 43], [30, 59], [30, 70]], 38 => [[30, 22], [28, 45], [30, 62], [30, 74]], 39 => [[30, 24], [28, 47], [30, 65], [30, 77]], 40 => [[30, 25], [28, 49], [30, 68], [30, 81]]]
Table 9 also states the (c, k, r) code of each block. It follows from these two numbers and the codeword capacity of the version, because the data codewords are shared out over the blocks as evenly as possible, so it is computed in Encode::getBlockSizes() rather than tabulated.
ECC_INDICATOR
File: Data.php line 137
public array<int, int> ECC_INDICATOR = [0b1, 0b0, 0b11, 0b10]
ECC_LEVELS
File: Data.php line 130
public array<string, int> ECC_LEVELS = ['L' => 0, 'M' => 1, 'Q' => 2, 'H' => 3]
FORMAT_GENERATOR
File: Data.php line 279
public int FORMAT_GENERATOR = 0b10100110111
FORMAT_MASK
File: Data.php line 286
public int FORMAT_MASK = 0b101010000010010
KANJI_RANGES
File: Data.php line 260
public array<int, array{int, int, int}> KANJI_RANGES = [[0x8140, 0x9ffc, 0x8140], [0xe040, 0xebbf, 0xc140]]
MODE_ALPHANUM
File: Data.php line 68
public int MODE_ALPHANUM = 1
MODE_BITS
File: Data.php line 96
public int MODE_BITS = 4
MODE_BYTE
File: Data.php line 75
public int MODE_BYTE = 2
MODE_INDICATOR
File: Data.php line 89
public array<int, int> MODE_INDICATOR = [0b1, 0b10, 0b100, 0b1000]
MODE_KANJI
File: Data.php line 82
public int MODE_KANJI = 3
MODE_NUMERIC
File: Data.php line 61
public int MODE_NUMERIC = 0
N1
File: Data.php line 310
public int N1 = 3
N2
File: Data.php line 318
public int N2 = 3
N3
File: Data.php line 326
public int N3 = 40
N4
File: Data.php line 334
public int N4 = 10
PAD_CODEWORDS
File: Data.php line 271
public array<int, int> PAD_CODEWORDS = [0xec, 0x11]
TERMINATOR_BITS
File: Data.php line 103
public int TERMINATOR_BITS = 4
VERSION_GENERATOR
File: Data.php line 294
public int VERSION_GENERATOR = 0b1111100100101
VERSION_INFO_MIN
File: Data.php line 302
public int VERSION_INFO_MIN = 7
VERSION_MAX
File: Data.php line 54
public int VERSION_MAX = 40
VERSION_MIN
File: Data.php line 47
public int VERSION_MIN = 1