Demonstration - Databar Expanded

Generally used for coupons and variable weight items.
Can encode a fixed amount of data.
Data input must follow the GS1 Standard; SSC identifier must be registered.
Contains Expanded and Expanded Stacked versions.
* 30 character limit for this demo.

<?php
use BarcodeBakery\Common\BCGFontFile;
use BarcodeBakery\Common\BCGColor;
use BarcodeBakery\Common\BCGDrawing;
use BarcodeBakery\Barcode\BCGdatabarexpanded;

$font = new BCGFontFile(__DIR__ . '/font/Arial.ttf', 18);
$colorBlack = new BCGColor(0, 0, 0);
$colorWhite = new BCGColor(255, 255, 255);

// Barcode Part
$code = new BCGdatabarexpanded();
$code->setScale(2);
$code->setThickness(30);
$code->setForegroundColor($colorBlack);
$code->setBackgroundColor($colorWhite);
$code->setFont($font);
$code->parse('240HELLO');

// Drawing Part
$drawing = new BCGDrawing($code, $colorWhite);

header('Content-Type: image/png');

$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>