Download the PHP package cibincasso/barcode-bundle without Composer

On this page you can find all versions of the php package cibincasso/barcode-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package barcode-bundle

SGKBarcodeBundle

CibincassoBarcodeBundle is the Symfony2 Barcode Generator Bundle what you want! This README is also available in French (中文).

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 s

Installation

Add SGKBarcodeBundle by running the command:

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

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

Then, Enable the bundle in the kernel:

Generate options

To generate one barcode, you have 5 options can be configured.

option type required allowed values description
code string required what you want encoded
type string required Supported Types type of barcode
format string required html, svg, png output format
width integer optional width of unit
height integer optional height of unit
color string for html, svg / array for png optional HTML Color Names / array(R, G, B) barcode color

Default width and height for 2D barcode are 5, 5, for 1D are 2, 30. Default color for html, svg is black, for png is array(0, 0, 0)

Usage by service

The bundle registers one service: sgk_barcode.generator which will allows you to generate barcode:

For format png, the generator return the based64 of png file, so you can get the real data of png by base64_decode($barcode). Here we use Data URI scheme to direct display the png in webpage.

Usage in Twig template

This bundle extend one function of Twig: barcode which you can simply use it to generate barcode in the twig template.

barcode use the same options, only different thing is your need pass a Twig array (it looks really like Json, but it isn't) in the function.

Usage without service

Save Barcode in file

As you can see, the Bundle save nothing on the file system, But if you want to keep the barcode, No problem!

Supported Barcode Types

Please read Wikipedia page to know which type you should choice.

2d barcodes

type Name Example(encode 123456)
qrcode QR code
pdf417 PDF417
datamatrix Data Matrix

1d barcodes

type Symbology Example(encode 123456)
c39 Code 39
c39+ Code 39 CHECK_DIGIT
c39e Code 39 EXTENDED
c39e+ Code 39 EXTENDED CHECK_DIGIT
c93 Code 93
s25 Standard 2 of 5
s25+ Standard 2 of 5 CHECK_DIGIT
i25 Interleaved 2 of 5
i25+ Interleaved 2 of 5 CHECK_DIGIT
c128 Code 128
c128a Code 128A
c128b Code 128B
c128c Code 128C
ean2 EAN 2
ean5 EAN 5
ean8 EAN 8
ean13 EAN 13
upca UPC-A
upce UPC-B
msi MSI
msi+ MSI CHECK_DIGIT
postnet POSTNET
planet PLANET
rms4cc RMS4CC
kix KIX-code
imb IM barcode
codabar Codabar
code11 Code 11
pharma Pharmacode
pharma2t Pharmacode Two-Track

Requirements

If there is some problem of requirements, make sure you have install these two extensions of PHP (check in your phpinfo()).

Tests

To execute unit tests:


All versions of barcode-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/framework-bundle Version >=2.3
symfony/twig-bundle Version >=2.3
symfony/options-resolver Version >=2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cibincasso/barcode-bundle contains the following files

Loading the files please wait ....