GS1 DataBar Limited

GS1 DataBar Limited barcode in PHP: 14 digit GTIN input, indicator digit limit, code example and SVG output

The narrowest of the family, 74 modules wide and 10 high, for items that cannot carry anything larger. The price of that size is the indicator digit: the first digit of the GTIN has to be 0 or 1, so the format only covers retail consumer units.

Type Token

ItemValue
Type tokenDATABARLIMITED
Enum caseBarcodeType::DATABARLIMITED
FamilyLinear
StandardISO/IEC 24724
Class\Com\Tecnick\Barcode\Type\Linear\GsOneDataBarLimited

Input

ItemValue
Character setdigits
Length13 digits, or 14 with a valid check digit; the indicator digit must be 0 or 1
Checkmodulo 10, appended when the payload is 13 digits and verified when it is 14
Extra parameters1 (see below)

Extra Parameters

Appended to the type token after commas, as in DATABARLIMITED,1.

PositionMeaningValuesDefault
12D component linkage flag1 sets the linkage bitunset

Examples

A GTIN-14 with indicator digit 1

<?php

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

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

echo $bobj->getInlineSvgCode();

GS1 DataBar Limited barcode encoding 15012345678907

Errors

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

PayloadMessage
25012345678907Invalid check digit: 4

See Also