PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Elminson De Oleo   PHP Barcode Generator Save Image   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Barcode Generator Save Image
Generate barcode images in several formats
Author: By
Last change:
Date: 3 years ago
Size: 501 bytes
 

Contents

Class file image Download
<?php
/**
 * User: Elminson De Oleo Baez
 * Date: 9/15/2018
 * Time: 3:01 PM
 */

namespace Elminson\BarCode;

require_once(
__DIR__ . '/vendor/autoload.php');

$barcode = new BarCode('code128');
$barcode->setPrint(true);
$barcode->setText("testing");
$barcode->setTextColor("#ff9900");
$barcode->setBgColor("#cccccc");
$barcode->setFileName("test");
$barcode->setFilepath(__DIR__."/temp/");
$barcode->generate();
$barcode->SaveBarcodeToDisk();
$barcode->GetPngData();
$barcode->DrawBarcodeToScreen();