Data

Data for Datamatrix Barcode type class

Namespace: Com\Tecnick\Barcode\Type\Square\Datamatrix

File: Data.php line 36

Data for Datamatrix Barcode type class

Tags

Constants

CHSET

File: Data.php line 1098

public array<string, array<int|string, int>> CHSET = ['C40' => [ // Basic set for C40 'S1' => 0x0, 'S2' => 0x1, 'S3' => 0x2, 0x20 => 0x3, 0x30 => 0x4, 0x31 => 0x5, 0x32 => 0x6, 0x33 => 0x7, 0x34 => 0x8, 0x35 => 0x9, 0x36 => 0xa, 0x37 => 0xb, 0x38 => 0xc, 0x39 => 0xd, 0x41 => 0xe, 0x42 => 0xf, 0x43 => 0x10, 0x44 => 0x11, 0x45 => 0x12, 0x46 => 0x13, 0x47 => 0x14, 0x48 => 0x15, 0x49 => 0x16, 0x4a => 0x17, 0x4b => 0x18, 0x4c => 0x19, 0x4d => 0x1a, 0x4e => 0x1b, 0x4f => 0x1c, 0x50 => 0x1d, 0x51 => 0x1e, 0x52 => 0x1f, 0x53 => 0x20, 0x54 => 0x21, 0x55 => 0x22, 0x56 => 0x23, 0x57 => 0x24, 0x58 => 0x25, 0x59 => 0x26, 0x5a => 0x27, ], 'TXT' => [ // Basic set for TEXT 'S1' => 0x0, 'S2' => 0x1, 'S3' => 0x2, 0x20 => 0x3, 0x30 => 0x4, 0x31 => 0x5, 0x32 => 0x6, 0x33 => 0x7, 0x34 => 0x8, 0x35 => 0x9, 0x36 => 0xa, 0x37 => 0xb, 0x38 => 0xc, 0x39 => 0xd, 0x61 => 0xe, 0x62 => 0xf, 0x63 => 0x10, 0x64 => 0x11, 0x65 => 0x12, 0x66 => 0x13, 0x67 => 0x14, 0x68 => 0x15, 0x69 => 0x16, 0x6a => 0x17, 0x6b => 0x18, 0x6c => 0x19, 0x6d => 0x1a, 0x6e => 0x1b, 0x6f => 0x1c, 0x70 => 0x1d, 0x71 => 0x1e, 0x72 => 0x1f, 0x73 => 0x20, 0x74 => 0x21, 0x75 => 0x22, 0x76 => 0x23, 0x77 => 0x24, 0x78 => 0x25, 0x79 => 0x26, 0x7a => 0x27, ], 'SH1' => [ // Shift 1 set 0x0 => 0x0, 0x1 => 0x1, 0x2 => 0x2, 0x3 => 0x3, 0x4 => 0x4, 0x5 => 0x5, 0x6 => 0x6, 0x7 => 0x7, 0x8 => 0x8, 0x9 => 0x9, 0xa => 0xa, 0xb => 0xb, 0xc => 0xc, 0xd => 0xd, 0xe => 0xe, 0xf => 0xf, 0x10 => 0x10, 0x11 => 0x11, 0x12 => 0x12, 0x13 => 0x13, 0x14 => 0x14, 0x15 => 0x15, 0x16 => 0x16, 0x17 => 0x17, 0x18 => 0x18, 0x19 => 0x19, 0x1a => 0x1a, 0x1b => 0x1b, 0x1c => 0x1c, 0x1d => 0x1d, 0x1e => 0x1e, 0x1f => 0x1f, ], 'SH2' => [ // Shift 2 set 0x21 => 0x0, 0x22 => 0x1, 0x23 => 0x2, 0x24 => 0x3, 0x25 => 0x4, 0x26 => 0x5, 0x27 => 0x6, 0x28 => 0x7, 0x29 => 0x8, 0x2a => 0x9, 0x2b => 0xa, 0x2c => 0xb, 0x2d => 0xc, 0x2e => 0xd, 0x2f => 0xe, 0x3a => 0xf, 0x3b => 0x10, 0x3c => 0x11, 0x3d => 0x12, 0x3e => 0x13, 0x3f => 0x14, 0x40 => 0x15, 0x5b => 0x16, 0x5c => 0x17, 0x5d => 0x18, 0x5e => 0x19, 0x5f => 0x1a, 'F1' => 0x1b, 'US' => 0x1e, ], 'S3C' => [ // Shift 3 set for C40 0x60 => 0x0, 0x61 => 0x1, 0x62 => 0x2, 0x63 => 0x3, 0x64 => 0x4, 0x65 => 0x5, 0x66 => 0x6, 0x67 => 0x7, 0x68 => 0x8, 0x69 => 0x9, 0x6a => 0xa, 0x6b => 0xb, 0x6c => 0xc, 0x6d => 0xd, 0x6e => 0xe, 0x6f => 0xf, 0x70 => 0x10, 0x71 => 0x11, 0x72 => 0x12, 0x73 => 0x13, 0x74 => 0x14, 0x75 => 0x15, 0x76 => 0x16, 0x77 => 0x17, 0x78 => 0x18, 0x79 => 0x19, 0x7a => 0x1a, 0x7b => 0x1b, 0x7c => 0x1c, 0x7d => 0x1d, 0x7e => 0x1e, 0x7f => 0x1f, ], 'S3T' => [ // Shift 3 set for TEXT 0x60 => 0x0, 0x41 => 0x1, 0x42 => 0x2, 0x43 => 0x3, 0x44 => 0x4, 0x45 => 0x5, 0x46 => 0x6, 0x47 => 0x7, 0x48 => 0x8, 0x49 => 0x9, 0x4a => 0xa, 0x4b => 0xb, 0x4c => 0xc, 0x4d => 0xd, 0x4e => 0xe, 0x4f => 0xf, 0x50 => 0x10, 0x51 => 0x11, 0x52 => 0x12, 0x53 => 0x13, 0x54 => 0x14, 0x55 => 0x15, 0x56 => 0x16, 0x57 => 0x17, 0x58 => 0x18, 0x59 => 0x19, 0x5a => 0x1a, 0x7b => 0x1b, 0x7c => 0x1c, 0x7d => 0x1d, 0x7e => 0x1e, 0x7f => 0x1f, ], 'X12' => [ // Set for X12 0xd => 0x0, 0x2a => 0x1, 0x3e => 0x2, 0x20 => 0x3, 0x30 => 0x4, 0x31 => 0x5, 0x32 => 0x6, 0x33 => 0x7, 0x34 => 0x8, 0x35 => 0x9, 0x36 => 0xa, 0x37 => 0xb, 0x38 => 0xc, 0x39 => 0xd, 0x41 => 0xe, 0x42 => 0xf, 0x43 => 0x10, 0x44 => 0x11, 0x45 => 0x12, 0x46 => 0x13, 0x47 => 0x14, 0x48 => 0x15, 0x49 => 0x16, 0x4a => 0x17, 0x4b => 0x18, 0x4c => 0x19, 0x4d => 0x1a, 0x4e => 0x1b, 0x4f => 0x1c, 0x50 => 0x1d, 0x51 => 0x1e, 0x52 => 0x1f, 0x53 => 0x20, 0x54 => 0x21, 0x55 => 0x22, 0x56 => 0x23, 0x57 => 0x24, 0x58 => 0x25, 0x59 => 0x26, 0x5a => 0x27, ]]

CHSET_ID

File: Data.php line 1087

public array<int, string> CHSET_ID = [self::ENC_C40 => 'C40', self::ENC_TXT => 'TXT', self::ENC_X12 => 'X12']

ENC_ASCII

File: Data.php line 52

public int ENC_ASCII = 0

ENC_ASCII_EXT

File: Data.php line 94

public int ENC_ASCII_EXT = 6

ENC_ASCII_NUM

File: Data.php line 101

public int ENC_ASCII_NUM = 7

ENC_BASE256

File: Data.php line 87

public int ENC_BASE256 = 5

ENC_C40

File: Data.php line 59

public int ENC_C40 = 1

ENC_EDF

File: Data.php line 80

public int ENC_EDF = 4

ENC_TXT

File: Data.php line 66

public int ENC_TXT = 2

ENC_X12

File: Data.php line 73

public int ENC_X12 = 3

ENCOPTS

File: Data.php line 108

public array<string, int> ENCOPTS = ['ASCII' => \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_ASCII, 'C40' => \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_C40, 'TXT' => \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_TXT, 'X12' => \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_X12, 'EDF' => \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_EDF, 'BASE256' => \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_BASE256]

SWITCHCDW

File: Data.php line 122

public array<int, int> SWITCHCDW = [\Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_ASCII => 254, \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_C40 => 230, \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_TXT => 239, \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_X12 => 238, \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_EDF => 240, \Com\Tecnick\Barcode\Type\Square\Datamatrix\Data::ENC_BASE256 => 231]

SYMBATTR

File: Data.php line 157

public array<string, array<string|int, array{int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int}>> SYMBATTR = ['S' => [ // square form // 10x10 [0xa, 0xa, 0x8, 0x8, 0xa, 0xa, 0x8, 0x8, 0x1, 0x1, 0x1, 0x3, 0x5, 0x1, 0x3, 0x5], // 12x12 [0xc, 0xc, 0xa, 0xa, 0xc, 0xc, 0xa, 0xa, 0x1, 0x1, 0x1, 0x5, 0x7, 0x1, 0x5, 0x7], // 14x14 [0xe, 0xe, 0xc, 0xc, 0xe, 0xe, 0xc, 0xc, 0x1, 0x1, 0x1, 0x8, 0xa, 0x1, 0x8, 0xa], // 16x16 [0x10, 0x10, 0xe, 0xe, 0x10, 0x10, 0xe, 0xe, 0x1, 0x1, 0x1, 0xc, 0xc, 0x1, 0xc, 0xc], // 18x18 [0x12, 0x12, 0x10, 0x10, 0x12, 0x12, 0x10, 0x10, 0x1, 0x1, 0x1, 0x12, 0xe, 0x1, 0x12, 0xe], // 20x20 [0x14, 0x14, 0x12, 0x12, 0x14, 0x14, 0x12, 0x12, 0x1, 0x1, 0x1, 0x16, 0x12, 0x1, 0x16, 0x12], // 22x22 [0x16, 0x16, 0x14, 0x14, 0x16, 0x16, 0x14, 0x14, 0x1, 0x1, 0x1, 0x1e, 0x14, 0x1, 0x1e, 0x14], // 24x24 [0x18, 0x18, 0x16, 0x16, 0x18, 0x18, 0x16, 0x16, 0x1, 0x1, 0x1, 0x24, 0x18, 0x1, 0x24, 0x18], // 26x26 [0x1a, 0x1a, 0x18, 0x18, 0x1a, 0x1a, 0x18, 0x18, 0x1, 0x1, 0x1, 0x2c, 0x1c, 0x1, 0x2c, 0x1c], // 32x32 [0x20, 0x20, 0x1c, 0x1c, 0x10, 0x10, 0xe, 0xe, 0x2, 0x2, 0x4, 0x3e, 0x24, 0x1, 0x3e, 0x24], // 36x36 [0x24, 0x24, 0x20, 0x20, 0x12, 0x12, 0x10, 0x10, 0x2, 0x2, 0x4, 0x56, 0x2a, 0x1, 0x56, 0x2a], // 40x40 [0x28, 0x28, 0x24, 0x24, 0x14, 0x14, 0x12, 0x12, 0x2, 0x2, 0x4, 0x72, 0x30, 0x1, 0x72, 0x30], // 44x44 [0x2c, 0x2c, 0x28, 0x28, 0x16, 0x16, 0x14, 0x14, 0x2, 0x2, 0x4, 0x90, 0x38, 0x1, 0x90, 0x38], // 48x48 [0x30, 0x30, 0x2c, 0x2c, 0x18, 0x18, 0x16, 0x16, 0x2, 0x2, 0x4, 0xae, 0x44, 0x1, 0xae, 0x44], // 52x52 [0x34, 0x34, 0x30, 0x30, 0x1a, 0x1a, 0x18, 0x18, 0x2, 0x2, 0x4, 0xcc, 0x54, 0x2, 0x66, 0x2a], // 64x64 [0x40, 0x40, 0x38, 0x38, 0x10, 0x10, 0xe, 0xe, 0x4, 0x4, 0x10, 0x118, 0x70, 0x2, 0x8c, 0x38], // 72x72 [0x48, 0x48, 0x40, 0x40, 0x12, 0x12, 0x10, 0x10, 0x4, 0x4, 0x10, 0x170, 0x90, 0x4, 0x5c, 0x24], // 80x80 [0x50, 0x50, 0x48, 0x48, 0x14, 0x14, 0x12, 0x12, 0x4, 0x4, 0x10, 0x1c8, 0xc0, 0x4, 0x72, 0x30], // 88x88 [0x58, 0x58, 0x50, 0x50, 0x16, 0x16, 0x14, 0x14, 0x4, 0x4, 0x10, 0x240, 0xe0, 0x4, 0x90, 0x38], // 96x96 [0x60, 0x60, 0x58, 0x58, 0x18, 0x18, 0x16, 0x16, 0x4, 0x4, 0x10, 0x2b8, 0x110, 0x4, 0xae, 0x44], // 104x104 [0x68, 0x68, 0x60, 0x60, 0x1a, 0x1a, 0x18, 0x18, 0x4, 0x4, 0x10, 0x330, 0x150, 0x6, 0x88, 0x38], // 120x120 [0x78, 0x78, 0x6c, 0x6c, 0x14, 0x14, 0x12, 0x12, 0x6, 0x6, 0x24, 0x41a, 0x198, 0x6, 0xaf, 0x44], // 132x132 [0x84, 0x84, 0x78, 0x78, 0x16, 0x16, 0x14, 0x14, 0x6, 0x6, 0x24, 0x518, 0x1f0, 0x8, 0xa3, 0x3e], // 144x144 [0x90, 0x90, 0x84, 0x84, 0x18, 0x18, 0x16, 0x16, 0x6, 0x6, 0x24, 0x616, 0x26c, 0xa, 0x9c, 0x3e], ], 'R' => [ // rectangular form // 8x18 [0x8, 0x12, 0x6, 0x10, 0x8, 0x12, 0x6, 0x10, 0x1, 0x1, 0x1, 0x5, 0x7, 0x1, 0x5, 0x7], // 8x32 [0x8, 0x20, 0x6, 0x1c, 0x8, 0x10, 0x6, 0xe, 0x1, 0x2, 0x2, 0xa, 0xb, 0x1, 0xa, 0xb], // 12x26 [0xc, 0x1a, 0xa, 0x18, 0xc, 0x1a, 0xa, 0x18, 0x1, 0x1, 0x1, 0x10, 0xe, 0x1, 0x10, 0xe], // 12x36 [0xc, 0x24, 0xa, 0x20, 0xc, 0x12, 0xa, 0x10, 0x1, 0x2, 0x2, 0x16, 0x12, 0x1, 0x16, 0x12], // 16x36 [0x10, 0x24, 0xe, 0x20, 0x10, 0x12, 0xe, 0x10, 0x1, 0x2, 0x2, 0x20, 0x18, 0x1, 0x20, 0x18], // 16x48 [0x10, 0x30, 0xe, 0x2c, 0x10, 0x18, 0xe, 0x16, 0x1, 0x2, 0x2, 0x31, 0x1c, 0x1, 0x31, 0x1c], ], 'E' => [ // Data Matrix Rectangular Extension form, ordered by data codeword // capacity so that the smallest symbol that fits is the first match // 8x48 [0x8, 0x30, 0x6, 0x2c, 0x8, 0x18, 0x6, 0x16, 0x1, 0x2, 0x2, 0x12, 0xf, 0x1, 0x12, 0xf], // 8x64 [0x8, 0x40, 0x6, 0x38, 0x8, 0x10, 0x6, 0xe, 0x1, 0x4, 0x4, 0x18, 0x12, 0x1, 0x18, 0x12], // 8x80 [0x8, 0x50, 0x6, 0x48, 0x8, 0x14, 0x6, 0x12, 0x1, 0x4, 0x4, 0x20, 0x16, 0x1, 0x20, 0x16], // 8x96 [0x8, 0x60, 0x6, 0x58, 0x8, 0x18, 0x6, 0x16, 0x1, 0x4, 0x4, 0x26, 0x1c, 0x1, 0x26, 0x1c], // 12x64 [0xc, 0x40, 0xa, 0x38, 0xc, 0x10, 0xa, 0xe, 0x1, 0x4, 0x4, 0x2b, 0x1b, 0x1, 0x2b, 0x1b], // 20x36 [0x14, 0x24, 0x12, 0x20, 0x14, 0x12, 0x12, 0x10, 0x1, 0x2, 0x2, 0x2c, 0x1c, 0x1, 0x2c, 0x1c], // 8x120 [0x8, 0x78, 0x6, 0x6c, 0x8, 0x14, 0x6, 0x12, 0x1, 0x6, 0x6, 0x31, 0x20, 0x1, 0x31, 0x20], // 20x44 [0x14, 0x2c, 0x12, 0x28, 0x14, 0x16, 0x12, 0x14, 0x1, 0x2, 0x2, 0x38, 0x22, 0x1, 0x38, 0x22], // 16x64 [0x10, 0x40, 0xe, 0x38, 0x10, 0x10, 0xe, 0xe, 0x1, 0x4, 0x4, 0x3e, 0x24, 0x1, 0x3e, 0x24], // 8x144 [0x8, 0x90, 0x6, 0x84, 0x8, 0x18, 0x6, 0x16, 0x1, 0x6, 0x6, 0x3f, 0x24, 0x1, 0x3f, 0x24], // 12x88 [0xc, 0x58, 0xa, 0x50, 0xc, 0x16, 0xa, 0x14, 0x1, 0x4, 0x4, 0x40, 0x24, 0x1, 0x40, 0x24], // 26x40 [0x1a, 0x28, 0x18, 0x24, 0x1a, 0x14, 0x18, 0x12, 0x1, 0x2, 0x2, 0x46, 0x26, 0x1, 0x46, 0x26], // 22x48 [0x16, 0x30, 0x14, 0x2c, 0x16, 0x18, 0x14, 0x16, 0x1, 0x2, 0x2, 0x48, 0x26, 0x1, 0x48, 0x26], // 24x48 [0x18, 0x30, 0x16, 0x2c, 0x18, 0x18, 0x16, 0x16, 0x1, 0x2, 0x2, 0x50, 0x29, 0x1, 0x50, 0x29], // 20x64 [0x14, 0x40, 0x12, 0x38, 0x14, 0x10, 0x12, 0xe, 0x1, 0x4, 0x4, 0x54, 0x2a, 0x1, 0x54, 0x2a], // 26x48 [0x1a, 0x30, 0x18, 0x2c, 0x1a, 0x18, 0x18, 0x16, 0x1, 0x2, 0x2, 0x5a, 0x2a, 0x1, 0x5a, 0x2a], // 24x64 [0x18, 0x40, 0x16, 0x38, 0x18, 0x10, 0x16, 0xe, 0x1, 0x4, 0x4, 0x6c, 0x2e, 0x1, 0x6c, 0x2e], // 26x64 [0x1a, 0x40, 0x18, 0x38, 0x1a, 0x10, 0x18, 0xe, 0x1, 0x4, 0x4, 0x76, 0x32, 0x1, 0x76, 0x32], ]]

The shape key S holds the square sizes and R the rectangular sizes of ISO/IEC 16022; the key E holds the Data Matrix Rectangular Extension sizes of ISO/IEC 21471.

  • SHAPE
    • total matrix rows (including finder pattern)
    • total matrix cols (including finder pattern)
    • total matrix rows (without finder pattern)
    • total matrix cols (without finder pattern)
    • region data rows (with finder pattern)
    • region data col (with finder pattern)
    • region data rows (without finder pattern)
    • region data col (without finder pattern)
    • horizontal regions
    • vertical regions
    • regions
    • data codewords
    • error codewords
    • blocks
    • data codewords per block
    • error codewords per block

Methods

getPaddingSize()

File: Data.php line 1378

public static getPaddingSize(string $shape, int $ncw[, string $size = '' ]) : array{int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int}

Parameters

  • $shape : string: Shape.
  • $ncw : int: Number of codewords.
  • $size : string = ‘’: Symbol size as rows by columns, empty for the smallest one that fits.

Tags

Return values

array{int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int}