PHPackages                             samius/barcode-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. samius/barcode-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

samius/barcode-bundle
=====================

Symfony2 Barcode Generator Bundle with Twig function extension

06PHP

Since Apr 8Pushed 7y ago1 watchersCompare

[ Source](https://github.com/samius/barcode-bundle)[ Packagist](https://packagist.org/packages/samius/barcode-bundle)[ RSS](/packages/samius-barcode-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

SGKBarcodeBundle
================

[](#sgkbarcodebundle)

[![Build Status](https://camo.githubusercontent.com/e08530fd1865387d22e5c4395d257db9208a2288710388825c9669b7969ddb20/68747470733a2f2f7472617669732d63692e6f72672f7368616e6767756f6b616e2f53474b426172636f646542756e646c652e737667)](https://travis-ci.org/shangguokan/SGKBarcodeBundle)[![Latest Stable Version](https://camo.githubusercontent.com/81619f925658c1d66c35c7904388cae1d71955ddfd6574f2a7db3f478d0bd260/68747470733a2f2f706f7365722e707567782e6f72672f73676b2f626172636f64652d62756e646c652f762f737461626c65)](https://packagist.org/packages/sgk/barcode-bundle) [![Total Downloads](https://camo.githubusercontent.com/5c882ea2983164093fd47a585a7d5926d0bbdfe072007dae4881149979a69228/68747470733a2f2f706f7365722e707567782e6f72672f73676b2f626172636f64652d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/sgk/barcode-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/2dd855635edec215d454a5cd22ce1aa2148a905bc0f741c2b957c6c81e8df4a5/68747470733a2f2f706f7365722e707567782e6f72672f73676b2f626172636f64652d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/sgk/barcode-bundle) [![License](https://camo.githubusercontent.com/f272131811fde4f7af7a4ca6a5cbf9c4123cc8ca48ee919c4e1058f0985eab74/68747470733a2f2f706f7365722e707567782e6f72672f73676b2f626172636f64652d62756e646c652f6c6963656e7365)](https://packagist.org/packages/sgk/barcode-bundle)

SGKBarcodeBundle is the Symfony2 Barcode Generator Bundle what you want! This README is also available in French ([Français](Resources/doc/README_fr.md)) and Chinese ([中文](Resources/doc/README_zh-CN.md)).

Features:

1. Support 3 two-dimensional (2D) and 30 one-dimensional (1D) Barcode types
2. Three output formats: HTML, PNG and SVG canvas
3. Twig integration: you can simply use a extensional function of Twig in the template to generate Barcode
4. Core of this bundle use this laravel project: [dinesh/barcode](https://github.com/dineshrabara/barcode)

[![SGKBarcodeBundle](Resources/doc/README.png)](Resources/doc/README.png)

Installation
------------

[](#installation)

Add SGKBarcodeBundle by running the command:

```
// Symfony version = 2.7
$ php composer.phar require sgk/barcode-bundle:~2.0
```

Or, add SGKBarcodeBundle to your `composer.json`, then execute `php composer.phar update`

```
// Symfony version < 2.7
"require": {
        "sgk/barcode-bundle": "~1.0"
    }

// Symfony version >= 2.7
"require": {
        "sgk/barcode-bundle": "~2.0"
    }
```

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

Then, Enable the bundle in the kernel:

```
