Giter VIP home page Giter VIP logo

barcode39's Introduction

PHP Barcode Generator Class Code 39

Here is an easy to use PHP barcode generator class for code 39 barcodes.

PHP Barcode Generator Class Code 39

Installation

This package can be installed easily using Composer. Simply add the following to the composer.json file at the root of your project:

{
  "require": {
    "fobiaweb/barcode39": "*"
  }
}

Then install your dependencies using composer.phar install.

Requirements:

PHP Web server and GD Library (Graphics Library).

Documentation

The PHP class will create a GIF barcode image or save a GIF barcode image file, here is an example:

// include Barcode39 class 
include "Barcode39.php"; 

// set Barcode39 object 
$bc = new Barcode39("Shay Anderson"); 

// display new barcode 
$bc->draw();

This example will output this barcode:

barcode39

You can also easily adjust the barcode bar sizes and text size:

// set object 
$bc = new Barcode39("123-ABC"); 

// set text size 
$bc->barcode_text_size = 5; 

// set barcode bar thickness (thick bars) 
$bc->barcode_bar_thick = 4; 

// set barcode bar thickness (thin bars) 
$bc->barcode_bar_thin = 2; 

// save barcode GIF file 
$bc->draw("barcode.gif");

This example will save this barcode as "barcode.gif":

barcode39

barcode39's People

Contributors

tyurind avatar noxss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.