hackzilla/barcode-bundle

Barcode Generator Bundle

Installs: 3 149

Dependents: 0

Stars: 6

Watchers: 2

Forks: 3

Open Issues: 1

Language: PHP

v1.4.1 2014-11-13 18:42 UTC

README

Generate barcodes as html, image or text.

Fork of Folke Ashberg's PHP Barcode v0.4 [http://www.ashberg.de/php-barcode/]

For usage and examples see: Resources/doc/index.rst

Build Status

Requirements

PHP 5.3.2

Optional

Twig GD Lib genbarcode

If you want to generate not only EAN-12/EAN-13/ISBN-Codes you have to install genbarcode, a small unix-commandline tool which uses GNU-Barcode. genbarcode is available http://www.ashberg.de/php-barcode , read genbarcodes README for installation. If you have installed genbarcode not to /usr/local/bin call set $barcode->setGenbarcodeLocation('/usr/local/bin/genbarcode')

Since 1.4 twig is passed using setTemplating() rather than the constructor. See updated examples.

Installation

Add HackzillaBarcodeBundle in your composer.json:

{
    "require": {
        "hackzilla/barcode-bundle": "~1.0"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update hackzilla/barcode-bundle

Composer will install the bundle to your project's vendor/hackzilla directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Hackzilla\BarcodeBundle\HackzillaBarcodeBundle(),
    );
}

Step 3: Follow the examples