Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dsiddhath2
committed
Sep 11, 2017
1 parent
0c2dd09
commit b43e01f
Showing
3 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
PHPZxing - Wrapper for Zxing Java Library | ||
=========================================== | ||
PHPZxing is a small php wrapper that uses the Zxing library to Create and read Barcodes. | ||
Under the hood it still uses the [Zxing library](https://github.com/zxing/zxing) to encode and decode data. | ||
|
||
Note | ||
-------------------- | ||
* Only Decoder is programmed right now. Needs programming of Encoder. | ||
|
||
Basic Configuration | ||
-------------------- | ||
|
||
Html Code: | ||
|
||
```json | ||
{ | ||
"require": { | ||
"sid/php-zxing": "dev-master" | ||
} | ||
} | ||
``` | ||
|
||
How to Use | ||
---------- | ||
```php | ||
|
||
use PHPZxing\PHPZxingDecoder; | ||
|
||
$decoder = new PHPZxingDecoder(); | ||
$decodedData = $decoder->decode('../images/Code128Barcode.jpg'); | ||
print_r($decodedData); | ||
|
||
$config = array( | ||
'try_harder' => true, // Non mobile mode | ||
'multiple_bar_codes' => true, // If the image contains muliple bar codes | ||
'crop' => '100,200,300,300', // If you want to crop image in pixels | ||
); | ||
$decoder = new PHPZxingDecoder($config); | ||
$decodedData = $decoder->decode('../images/'); // Reads images in complete directory | ||
print_r($decodedData); | ||
|
||
$decoder = new PHPZxingDecoder(); | ||
// Images can be sent as an array | ||
$imageArrays = array( | ||
'../images/Code128Barcode.jpg', | ||
'../images/Code39Barcode.jpg' | ||
); | ||
$decodedData = $decoder->decode($imageArrays); | ||
print_r($decodedData); | ||
|
||
$config = array( | ||
'try_harder' => true, | ||
'multiple_bar_codes' => true | ||
); | ||
$decoder = new PHPZxingDecoder($config); | ||
$decodedData = $decoder->decode('../images/multiple_bar_codes.jpg'); | ||
print_r($decodedData); | ||
``` | ||
|
||
Contibution | ||
-------------------- | ||
Please Contribute or suggest changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters