Plessey

Plessey barcode in PHP: hexadecimal input, CRC check, code example and SVG output

The older of the pair, from the 1970s. Plessey encodes hexadecimal digits and protects them with an eight-bit cyclic redundancy check rather than a modulo check digit; the library appends the CRC bits and the reversed terminator.

Type Token

ItemValue
Type tokenPLESSEY
Enum caseBarcodeType::PLESSEY
FamilyLinear
Class\Com\Tecnick\Barcode\Type\Linear\Plessey

Input

ItemValue
Character set0-9 and A-F, upper or lower case
Length1 to 30000 characters
Checkan 8-bit CRC, appended by the library
Extra parametersnone

Examples

Sixteen hexadecimal digits

<?php

require_once __DIR__ . '/vendor/autoload.php';

$barcode = new \Com\Tecnick\Barcode\Barcode();
$bobj = $barcode->getBarcodeObj(
    type: 'PLESSEY',
    code: '0123456789ABCDEF',
    width: -1,
    height: -30,
    color: 'black',
    padding: [0, 0, 0, 0],
)->setBackgroundColor('white');

echo $bobj->getInlineSvgCode();

Plessey barcode encoding 0123456789ABCDEF

Errors

These payloads raise \Com\Tecnick\Barcode\Exception:

PayloadMessage
GHIInvalid character: 71

See Also