PDF417 - Demonstration

Encode this text

* For this demo, no more than 200 characters allowed
Configurations
  • Scale
    * For this demo, you can only set 1 to 2
  • Foreground Color
  • Background Color
  • Number of Columns
    * For this demo, you can only set -1 to 3
  • Error Level
    * For this demo, you can only set -1 to 3
  • Compact
Code Result
<?php
require_once('BCGColor.php');
require_once('BCGDrawing.php');
require_once('BCGpdf417.barcode2d.php');
 
$colorfg = new BCGColor(0, 0, 0);
$colorbg = new BCGColor(255, 255, 255);
 
// Barcode part Part
$code = new BCGpdf417();
$code->setScale(2);
$code->setColumn(-1);
$code->setErrorLevel(-1);
$code->setCompact(false);
$code->setColor($colorfg, $colorbg);
$code->parse('PDF417');
 
// Drawing Part
$drawing = new BCGDrawing('', $colorbg);
$drawing->setBarcode($code);
$drawing->draw();
 
header('Content-Type: image/png');
 
$drawing->finish(BCGDrawing::IMG_FORMAT_PNG);
?>