HIBC in CODE 128

HIBC barcode in CODE 128 in PHP: data structure, check character, code example and SVG output

The same health industry data structure as HIBC39, drawn as a CODE 128 symbol instead. CODE 128 is denser, so this is the linear form to reach for when the label is tight.

Type Token

ItemValue
Type tokenHIBC128
Enum caseBarcodeType::HIBC128
FamilyLinear
StandardANSI/HIBC 2.6, ANSI/HIBC 1.3
Class\Com\Tecnick\Barcode\Type\Linear\HibcOneTwoEight

Input

ItemValue
Character setthe HIBC character set
Lengtha primary structure of 6 to 23 characters, with an optional secondary structure
Checkmodulo 43, appended by the library
Extra parametersnone

Examples

A primary data structure

<?php

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

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

echo $bobj->getInlineSvgCode();

HIBC in CODE 128 barcode encoding +A123BJC5D6E71

Errors

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

PayloadMessage
A123BJC5D6E71A HIBC data structure starts with the flag character “+”: A123BJC5D6E71

See Also