GS1 DataBar Stacked

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

Take the omnidirectional symbol, cut it in half and stack the halves: that is this format, for labels with more height than width. The two rows are separated by a pattern that tells the scanner how to put them back together.

Type Token

ItemValue
Type tokenDATABARSTACK
Enum caseBarcodeType::DATABARSTACK
FamilyLinear
StandardISO/IEC 24724
Class\Com\Tecnick\Barcode\Type\Linear\GsOneDataBarStacked

Input

ItemValue
Character setdigits
Length13 digits, or 14 with a valid check digit
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 DATABARSTACK,1.

PositionMeaningValuesDefault
12D component linkage flag1 sets the linkage bitunset

Examples

A GTIN-14 in two rows

<?php

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

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

echo $bobj->getInlineSvgCode();

GS1 DataBar Stacked barcode encoding 00012345678905

Errors

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

PayloadMessage
0950110153001AInput code must be a number

See Also