1. Go to this page and download the library: Download leeroy/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/ */
leeroy / barcode-generator example snippets
his will output the barcode as SVG with the Text under the code (last argument if true = add text)
$generator = new Picqer\Barcode\BarcodeGeneratorSVG();
return $generator->getBarcode('ABC123456789', $generator::TYPE_CODE_128, 2, 110, 'black', true);
$generatorSVG = new Picqer\Barcode\BarcodeGeneratorSVG(); // Vector based SVG
$generatorPNG = new Picqer\Barcode\BarcodeGeneratorPNG(); // Pixel based PNG
$generatorJPG = new Picqer\Barcode\BarcodeGeneratorJPG(); // Pixel based JPG
$generatorHTML = new Picqer\Barcode\BarcodeGeneratorHTML(); // Pixel based HTML
$generatorHTML = new Picqer\Barcode\BarcodeGeneratorDynamicHTML(); // Vector based HTML