Mailmark replaced RM4SCC for bulk mail, adding the reporting data that the service is built on. The application string is 22 characters for the C barcode or 26 for the L, and packs a format code, a version, a class, the Supply Chain ID that Royal Mail issues, an item identifier and the destination postcode.
The two lengths are the two barcode types; nothing else selects between them.
Type Token
| Item | Value |
|---|---|
| Type token | MAILMARK |
| Enum case | BarcodeType::MAILMARK |
| Family | Postal |
| Standard | Royal Mail Mailmark |
| Class | \Com\Tecnick\Barcode\Type\Linear\Mailmark |
Input
| Item | Value |
|---|---|
| Character set | 0-9, A-Z and space, with the field-by-field rules of the specification |
| Length | exactly 22 characters for type C, or 26 for type L |
| Check | Reed-Solomon check symbols, computed by the library |
| Extra parameters | none |
Examples
A type C application string
<?php
require_once __DIR__ . '/vendor/autoload.php';
$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
type: 'MAILMARK',
code: '41038422416563762EF61AH8T ',
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 |
|---|---|
4103842241656376 | The application string must be 22 characters for the barcode C or 26 for the barcode L, 16 given |
91038422416563762EF61AH8T | Invalid character: 57 |
See Also
- tc-lib-barcode : the library overview.
- Rendering Options : size, colour, padding.
- Output Formats : every renderer.
- RM4SCC : the format it replaced.
- API reference : the generated class documentation.