Recommend this page to a friend! |
Classes of Elminson De Oleo | PHP Barcode Generator Save Image | README.md | Download |
|
![]() BarCodeThis script that generates barcodes in four barcode formats including Code 128, Code 39, Code 2of5, and Codabar. the options of ?vertical? or ?horizontal? display, varying barcode heights, and one of four barcode formats. RequirePHP GD Library Installation
namespace Elminson\BarCode; require_once(__DIR__ . '/vendor/autoload.php'); $barcode = new BarCode('code128'); $barcode->setText("Testing"); $barcode->setPrint(true); $barcode->setTextColor("#ff9900"); $barcode->setBgColor("#cccccc"); $barcode->setFileName("test"); $barcode->setFilepath(__DIR__."/temp/"); $barcode->generate(); $barcode->SaveBarcodeToDisk(); $bardode->DestroyBarcode();
php-barcodeSource code for the article "How To Create Barcodes in PHP" found at: http://davidscotttufts.com/2009/03/31/how-to-create-barcodes-in-php/ |