Aztec - Demonstration

Encode this text

* For this demo, no more than 200 characters allowed
Configurations
  • Scale
    * For this demo, you can only set 1 to 4
  • Foreground Color
  • Background Color
  • Size
  • Error Level
Code Result
<?php
require_once('BCGColor.php');
require_once('BCGDrawing.php');
require_once('BCGdatamatrix.barcode2d.php');
 
$colorfg = new BCGColor(0, 0, 0);
$colorbg = new BCGColor(255, 255, 255);
 
// Barcode part Part
$code = new BCGaztec();
$code->setScale(4);
$code->setSize(BCGaztec::AZTEC_SIZE_SMALLEST);
$code->setErrorLevel(23);
$code->setColor($colorfg, $colorbg);
$code->parse('Aztec');
 
// Drawing Part
$drawing = new BCGDrawing('', $colorbg);
$drawing->setBarcode($code);
$drawing->draw();
 
header('Content-Type: image/png');
 
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>