Demonstration - MaxiCode
Mainly used in the postal sector for letters and packaging.
Encodes a fixed amount of data; can encode postal addresses.
Follows the industry standard.
<?php
use BarcodeBakery\Common\BCGColor;
use BarcodeBakery\Common\BCGDrawing;
use BarcodeBakery\Barcode\BCGmaxicode;
$colorBlack = new BCGColor(0, 0, 0);
$colorWhite = new BCGColor(255, 255, 255);
// Barcode Part
$code = new BCGmaxicode();
$code->setScale(3);
$code->setForegroundColor($colorBlack);
$code->setBackgroundColor($colorWhite);
$code->setMode(4);
$code->parse('Maxicode');
// Drawing Part
$drawing = new BCGDrawing($code, $colorWhite);
header('Content-Type: image/png');
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>