CODE 39 with check character

CODE 39 with the modulo 43 check character in PHP: input range, code example and SVG output

CODE 39 with the modulo 43 check character computed over the payload and appended before encoding. Plain CODE 39 carries no check character at all, so this is the variant to use where the scanner cannot validate the data by any other means.

Type Token

ItemValue
Type tokenC39+
Enum caseBarcodeType::C39Plus
FamilyLinear
StandardANSI MH10.8M-1983, USD-3
Class\Com\Tecnick\Barcode\Type\Linear\CodeThreeNineCheck

Input

ItemValue
Character setas CODE 39
Length1 to 30000 characters
Checkmodulo 43, appended by the library
Extra parametersnone

Examples

Digits with the check character

<?php

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

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

echo $bobj->getInlineSvgCode();

CODE 39 with check character barcode encoding 0123456789

Errors

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

PayloadMessage
abc!Invalid character: 33

See Also