GS1 DataBar Expanded Stacked

GS1 DataBar Expanded Stacked barcode in PHP: element string input, segments per row, code examples and SVG output

Expanded, folded into rows, for labels that are taller than they are wide. A row holds an even number of segments, from 2 to 20, and the default of 4 suits most label shapes.

Type Token

ItemValue
Type tokenDATABAREXPSTACK
Enum caseBarcodeType::DATABAREXPSTACK
FamilyLinear
StandardISO/IEC 24724
Class\Com\Tecnick\Barcode\Type\Linear\GsOneDataBarExpandedStacked

Input

ItemValue
Character setthe printable ASCII characters, in the bracketed element string form
Length4 to 22 symbol characters, up to 252 bits of compacted data
Checkper Application Identifier, where the definition specifies one
Extra parameters2 (see below)

Extra Parameters

Appended to the type token after commas, as in DATABAREXPSTACK,0,6.

PositionMeaningValuesDefault
12D component linkage flag1 sets the linkage bitunset
2segments per rowan even number from 2 to 204

Examples

Four segments per row, the default

<?php

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

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

echo $bobj->getInlineSvgCode();

GS1 DataBar Expanded Stacked barcode encoding (01)90614141000015(3202)000150

Six segments per row, a wider symbol

$bobj = $barcode->getBarcodeObj(
    type: 'DATABAREXPSTACK,0,6',
    code: '(01)90614141000015(3202)000150',
    width: -3,
    height: -3,
    color: 'black',
    padding: [0, 0, 0, 0],
)->setBackgroundColor('white');

GS1 DataBar Expanded Stacked barcode encoding (01)90614141000015(3202)000150

Errors

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

PayloadMessage
(01)9061414100001AThe data field of the Application Identifier (01) must be a number

See Also