Interleaving is what makes this one compact: the first digit of each pair is drawn in the bars and the second in the spaces between them. A numeric payload comes out at roughly half the width of Standard 2 of 5.
The pairing means the digit count has to be even. The library prepends a zero when it is odd, so 012345678 and 0012345678 produce the same symbol.
Type Token
| Item | Value |
|---|---|
| Type token | I25 |
| Enum case | BarcodeType::I25 |
| Family | Linear |
| Standard | ISO/IEC 16390 |
| Class | \Com\Tecnick\Barcode\Type\Linear\InterleavedTwoOfFive |
Input
| Item | Value |
|---|---|
| Character set | digits |
| Length | any number of digits; an odd count is left-padded with a zero |
| Check | none. Use I25+ for the modulo 10 check digit |
| Extra parameters | none |
Examples
Ten digits
<?php
require_once __DIR__ . '/vendor/autoload.php';
$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
type: 'I25',
code: '0123456789',
width: -3,
height: -30,
color: 'black',
padding: [0, 0, 0, 0],
)->setBackgroundColor('white');
echo $bobj->getInlineSvgCode();
Errors
These payloads raise \Com\Tecnick\Barcode\Exception:
| Payload | Message |
|---|---|
12A | Invalid character sequence: 2a |
See Also
- tc-lib-barcode : the library overview.
- Rendering Options : size, colour, padding.
- Output Formats : every renderer.
- Interleaved 2 of 5 with check digit : the same symbology with a check digit.
- ITF-14 : the GS1 profile of it, with bearer bars.
- Standard 2 of 5 : the wider, non-interleaved form.
- API reference : the generated class documentation.