Call zxing (code barre reader) with Symfony2
This library package requires PHP 5.3 or later, java, symfony/framework-bundle ~2.1 and james2001/zxing ~1.0
- With composer (recommended)
Add the following line to the composer.json
of your project and launch composer install command
{
"require": {
"james001/zxing-bundle": "~1.0"
}
}
Launch install from your project root with:
composer install --no-dev --prefer-dist
Add bundle in AppKernel.php
$bundles = array(
...
new James2001\Bundle\ZxingBundle\James2001ZxingBundle(),
...
);
$imagePath = '/path/image.jpg';
$myCode = $this->get('james2001.zxing')->findFirst($imagePath);