PHP code example of brewerwall / php-barcode-generator
1. Go to this page and download the library: Download brewerwall/php-barcode-generator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
brewerwall / php-barcode-generator example snippets
$generator = new BarcodeGenerator(BarcodeType::TYPE_CODE_128, BarcodeRender::RENDER_JPG);
// Generate our code
$generated = $generator->generate('012345678');
// Generates the same code with style updates
$generated = $generator->generate('012345678', 4, 50, '#FFCC33');
use Brewerwall\Barcode\Constants\BarcodeRender;
BarcodeRender::RENDER_JPG
BarcodeRender::RENDER_PNG
BarcodeRender::RENDER_HTML
BarcodeRender::RENDER_SVG