Demonstration - PDF417

Capable of containing large amounts of data in a variety of characters.
Used mainly for identification cards, inventory, and transport.
Dimensions of this barcode can be set; also contains a truncated version.
* 30 character limit for this demo.

<?php
use BarcodeBakery\Common\BCGColor;
use BarcodeBakery\Common\BCGDrawing;
use BarcodeBakery\Barcode\BCGpdf417;

$colorBlack = new BCGColor(0, 0, 0);
$colorWhite = new BCGColor(255, 255, 255);

// Barcode Part
$code = new BCGpdf417();
$code->setScale(3);
$code->setForegroundColor($colorBlack);
$code->setBackgroundColor($colorWhite);
$code->setErrorLevel(2);
$code->setCompact(false);
$code->setQuietZone(true);
$code->parse('PDF417');

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

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

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