A two-digit Format Control Code opens the payload and says what follows it: 11 for a sorting code alone, 59 and 62 for a sorting code with customer information, 00 for the reply paid form, which is only valid with a zero sorting code. Eight digits of sorting code come next, then the customer information the FCC allows.
Capacity is counted in bars. The N table spends 2 bars on a digit and the C table 3 on an alphanumeric character, so FCC 59 holds 8 digits or 5 characters, and FCC 62 holds 15 or 10.
Type Token
| Item | Value |
|---|---|
| Type token | AUSPOST |
| Enum case | BarcodeType::AUSPOST |
| Family | Postal |
| Standard | Australia Post Customer Barcode |
| Class | \Com\Tecnick\Barcode\Type\Linear\AustraliaPost |
Input
| Item | Value |
|---|---|
| Character set | digits for the FCC and the sorting code; the N or C table for the customer information |
| Length | 10 digits, plus customer information up to 16 bars for FCC 59 or 31 bars for FCC 62 |
| Check | Reed-Solomon check symbols, computed by the library |
| Extra parameters | 1 (see below) |
Extra Parameters
Appended to the type token after commas, as in AUSPOST,N.
| Position | Meaning | Values | Default |
|---|---|---|---|
| 1 | customer information table | C alphanumeric at 3 bars per character, N numeric at 2 bars per digit | C |
Examples
FCC 62 with alphanumeric customer information
<?php
require_once __DIR__ . '/vendor/autoload.php';
$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
type: 'AUSPOST',
code: '6254516251ABC123',
width: -3,
height: -30,
color: 'black',
padding: [0, 0, 0, 0],
)->setBackgroundColor('white');
echo $bobj->getInlineSvgCode();
The numeric table, 15 digits of customer information
$bobj = $barcode->getBarcodeObj(
type: 'AUSPOST,N',
code: '6262545162123456789012345',
width: -3,
height: -30,
color: 'black',
padding: [0, 0, 0, 0],
)->setBackgroundColor('white');
Errors
These payloads raise \Com\Tecnick\Barcode\Exception:
| Payload | Message |
|---|---|
12254516251 | Unsupported Format Control Code: 12 |
625451625 | The code must start with the 2 digit Format Control Code and the 8 digit sorting code |
5962545162ABCDEF | The customer information is too long: 18 bars (maximum 16) |
See Also
- tc-lib-barcode : the library overview.
- Rendering Options : size, colour, padding.
- Output Formats : every renderer.
- RM4SCC : the British four-state format.
- Japan Post : the Japanese customer format.
- API reference : the generated class documentation.