PHPackages                             bulgarianhealer/barcode - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bulgarianhealer/barcode

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bulgarianhealer/barcode
=======================

Barcode generator like Qr Code , PDF417,C39, C39+,C39E,C39E+,C93,S25,S25+,I25,I25+,C128,C128A,C128B,C128C,2-Digits UPC-Based Extention,5-Digits UPC-Based Extention,EAN 8,EAN 13,UPC-A,UPC-E,MSI (Variation of Plessey code)

6.04(6y ago)010LGPL-3.0PHPPHP &gt;=7.2.0

Since Feb 22Pushed 6y agoCompare

[ Source](https://github.com/BulgarianHealer/barcode)[ Packagist](https://packagist.org/packages/bulgarianhealer/barcode) Fund[ GitHub Sponsors](https://github.com/milon)[ RSS](/packages/bulgarianhealer-barcode/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (1)Versions (36)Used By (0)

[![Packagist Downloads](https://camo.githubusercontent.com/65f8e8131ef2cd43e49b7c912fa043101416f25d7f345b96a324add912a42b34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62756c67617269616e6865616c65722f626172636f64652e737667)](https://packagist.org/packages/bulgarianhealer/barcode) [![Stable version](https://camo.githubusercontent.com/26ee2e6429e620b9d8d896f8a793f06ef17b94851550a1ad06f92058961959c4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62756c67617269616e6865616c65722f626172636f64652e737667)](https://packagist.org/packages/bulgarianhealer/barcode) [![License](https://camo.githubusercontent.com/8745b339f3d011f71ce7f81611914c3e26d1f753e13bdfca5921e63e96b40d81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f62756c67617269616e6865616c65722f626172636f64652e737667)](https://packagist.org/packages/bulgarianhealer/barcode)

This is a barcode generation package inspired by . Actually, I use that package's underline classes for generating barcodes. This package is just a wrapper of that package and adds compatibility with Laravel 5.

I used the following classes of that package.

- src/bulgarianhealer/barcode/Datamatrix.php (include/barcodes/datamatrix.php)
- src/bulgarianhealer/barcode/DNS1D.php (tcpdf\_barcodes\_1d.php)
- src/bulgarianhealer/barcode/DNS2D.php (tcpdf\_barcodes\_2d.php)
- src/bulgarianhealer/barcode/PDF417.php (include/barcodes/pdf417.php)
- src/bulgarianhealer/barcode/QRcode.php (include/barcodes/qrcode.php)

[Read More on TCPDF website](http://www.tcpdf.org)

This package is compatible with Laravel `4.*` , `5.*` and `6.*`
===============================================================

[](#this-package-is-compatible-with-laravel-4--5-and-6)

This package relies on [php-gd](http://php.net/manual/en/book.image.php) extension. So, make sure it is installed on your machine.

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

[](#installation)

Begin by installing this package through Composer. Just run following command to terminal-

```
composer require bulgarianhealer/barcode

```

You can also edit your project's `composer.json` file to require `bulgarianhealer/barcode`.

```
"require": {
    ...
    "bulgarianhealer/barcode": "^6.0"
}

```

For Laravel 5.0 and 5.1 use this-

```
"require": {
    ...
    "bulgarianhealer/barcode": "^5.1"
}

```

For Laravel 4.0, 4.1 and 4.2 use this-

```
"require": {
    ...
    "bulgarianhealer/barcode": "^4.2"
}

```

Next, update Composer from the Terminal:

```
composer update

```

Once this operation completes, the final step is to add the service provider. Open `config/app.php`, and add a new item to the providers array.

```
'providers' => [
    ...
    Milon\Barcode\BarcodeServiceProvider::class,
    ...
]
```

For version 4.\* add these lines on `app/config/app.php` file-

```
'providers' => array(
    ...
    'Milon\Barcode\BarcodeServiceProvider',
)
```

If you want to change Bar-code's settings (Store Path etc.), you need to publish its config file(s). For that you need to run in the terminal-

```
# Laravel 5.x
php artisan vendor:publish

# Laravel 4.x
php artisan config:publish bulgarianhealer/barcode

```

Make sure you have write permission to the storage path. By default it sets to `/storage` folder.

Now add the alias.

```
'aliases' => [
    ...
    'DNS1D' => Milon\Barcode\Facades\DNS1DFacade::class,
    'DNS2D' => Milon\Barcode\Facades\DNS2DFacade::class,
]
```

For version 4.2 alias will be like this-

```
'aliases' => array(
    ...
    'DNS1D' => 'Milon\Barcode\Facades\DNS1DFacade',
    'DNS2D' => 'Milon\Barcode\Facades\DNS2DFacade',
)
```

Bar-code generator like Qr Code, PDF417, C39,C39+, C39E,C39E+, C93, S25,S25+, I25,I25+, C128,C128A,C128B,C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8,EAN 13, UPC-A,UPC-E, MSI (Variation of Plessey code)

generator in html, png embedded base64 code and SVG canvas

```
echo DNS1D::getBarcodeSVG("4445645656", "PHARMA2T");
echo DNS1D::getBarcodeHTML("4445645656", "PHARMA2T");
echo '';
echo DNS1D::getBarcodePNGPath("4445645656", "PHARMA2T");
echo '';
```

```
echo DNS1D::getBarcodeSVG("4445645656", "C39");
echo DNS2D::getBarcodeHTML("4445645656", "QRCODE");
echo DNS2D::getBarcodePNGPath("4445645656", "PDF417");
echo DNS2D::getBarcodeSVG("4445645656", "DATAMATRIX");
echo '';
```

Width and Height example
------------------------

[](#width-and-height-example)

```
echo DNS1D::getBarcodeSVG("4445645656", "PHARMA2T",3,33);
echo DNS1D::getBarcodeHTML("4445645656", "PHARMA2T",3,33);
echo '';
echo DNS1D::getBarcodePNGPath("4445645656", "PHARMA2T",3,33);
echo '';
```

Color
-----

[](#color)

```
echo DNS1D::getBarcodeSVG("4445645656", "PHARMA2T",3,33,"green");
echo DNS1D::getBarcodeHTML("4445645656", "PHARMA2T",3,33,"green");
echo '';
echo DNS1D::getBarcodePNGPath("4445645656", "PHARMA2T",3,33,array(255,255,0));
echo '';
```

Show Text
---------

[](#show-text)

```
echo DNS1D::getBarcodeSVG("4445645656", "PHARMA2T",3,33,"green", true);
echo DNS1D::getBarcodeHTML("4445645656", "PHARMA2T",3,33,"green", true);
echo '';
echo DNS1D::getBarcodePNGPath("4445645656", "PHARMA2T",3,33,array(255,255,0), true);
echo '';
```

2D Barcodes
-----------

[](#2d-barcodes)

```
echo DNS2D::getBarcodeHTML("4445645656", "QRCODE");
echo DNS2D::getBarcodePNGPath("4445645656", "PDF417");
echo DNS2D::getBarcodeSVG("4445645656", "DATAMATRIX");
```

1D Barcodes
-----------

[](#1d-barcodes)

```
echo DNS1D::getBarcodeHTML("4445645656", "C39");
echo DNS1D::getBarcodeHTML("4445645656", "C39+");
echo DNS1D::getBarcodeHTML("4445645656", "C39E");
echo DNS1D::getBarcodeHTML("4445645656", "C39E+");
echo DNS1D::getBarcodeHTML("4445645656", "C93");
echo DNS1D::getBarcodeHTML("4445645656", "S25");
echo DNS1D::getBarcodeHTML("4445645656", "S25+");
echo DNS1D::getBarcodeHTML("4445645656", "I25");
echo DNS1D::getBarcodeHTML("4445645656", "I25+");
echo DNS1D::getBarcodeHTML("4445645656", "C128");
echo DNS1D::getBarcodeHTML("4445645656", "C128A");
echo DNS1D::getBarcodeHTML("4445645656", "C128B");
echo DNS1D::getBarcodeHTML("4445645656", "C128C");
echo DNS1D::getBarcodeHTML("44455656", "EAN2");
echo DNS1D::getBarcodeHTML("4445656", "EAN5");
echo DNS1D::getBarcodeHTML("4445", "EAN8");
echo DNS1D::getBarcodeHTML("4445", "EAN13");
echo DNS1D::getBarcodeHTML("4445645656", "UPCA");
echo DNS1D::getBarcodeHTML("4445645656", "UPCE");
echo DNS1D::getBarcodeHTML("4445645656", "MSI");
echo DNS1D::getBarcodeHTML("4445645656", "MSI+");
echo DNS1D::getBarcodeHTML("4445645656", "POSTNET");
echo DNS1D::getBarcodeHTML("4445645656", "PLANET");
echo DNS1D::getBarcodeHTML("4445645656", "RMS4CC");
echo DNS1D::getBarcodeHTML("4445645656", "KIX");
echo DNS1D::getBarcodeHTML("4445645656", "IMB");
echo DNS1D::getBarcodeHTML("4445645656", "CODABAR");
echo DNS1D::getBarcodeHTML("4445645656", "CODE11");
echo DNS1D::getBarcodeHTML("4445645656", "PHARMA");
echo DNS1D::getBarcodeHTML("4445645656", "PHARMA2T");
```

Running without Laravel
=======================

[](#running-without-laravel)

You can use this library without using Laravel.

Example:

```
use \Milon\Barcode\DNS1D;

$d = new DNS1D();
$d->setStorPath(__DIR__."/cache/");
echo $d->getBarcodeHTML("9780691147727", "EAN13");

```

License
-------

[](#license)

This package is published under `GNU LGPLv3` license and copyright to [Nuruzzaman Milon](http://milon.im). Original Barcode generation classes were written by Nicola Asuni. The license agreement is on project's root.

### [Buy me a coffee ☕](https://paypal.me/tomilon?locale.x=en_US)

[](#buy-me-a-coffee-)

License: GNU LGPLv3
Package Author: [Nuruzzaman Milon](http://milon.im)
Original Barcode Class Author: [Nicola Asuni](http://www.tcpdf.org)
Package Copyright: Nuruzzaman Milon
Barcode Generation Class Copyright:
Nicola Asuni
Tecnick.com LTD
[www.tecnick.com](http://www.tecnick.com)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 63.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~57 days

Recently: every ~0 days

Total

33

Last Release

2261d ago

Major Versions

1.0.2 → 4.22016-01-13

4.2.2 → 5.1.02016-01-13

4.2.3 → 5.3.02016-10-18

4.2.4 → 5.1.12017-03-04

5.3.6 → 6.0.02019-09-09

PHP version history (4 changes)0.5PHP &gt;=5.4.0

4.2PHP &gt;=5.3.0

5.3.6PHP &gt;=5.6.0

6.0.3PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/92ea75671991229b68263158e4b9fcc0527be358e097ec2a86e5b68b50c73808?d=identicon)[Krokit](/maintainers/Krokit)

---

Top Contributors

[![milon](https://avatars.githubusercontent.com/u/1138769?v=4)](https://github.com/milon "milon (55 commits)")[![BulgarianHealer](https://avatars.githubusercontent.com/u/8360887?v=4)](https://github.com/BulgarianHealer "BulgarianHealer (7 commits)")[![maosalah](https://avatars.githubusercontent.com/u/2687734?v=4)](https://github.com/maosalah "maosalah (3 commits)")[![yoshkin](https://avatars.githubusercontent.com/u/4170784?v=4)](https://github.com/yoshkin "yoshkin (2 commits)")[![Ank91](https://avatars.githubusercontent.com/u/98448051?v=4)](https://github.com/Ank91 "Ank91 (2 commits)")[![junereycasuga](https://avatars.githubusercontent.com/u/1797584?v=4)](https://github.com/junereycasuga "junereycasuga (2 commits)")[![laszlokis-lynx](https://avatars.githubusercontent.com/u/258006090?v=4)](https://github.com/laszlokis-lynx "laszlokis-lynx (2 commits)")[![mix5003](https://avatars.githubusercontent.com/u/1129524?v=4)](https://github.com/mix5003 "mix5003 (2 commits)")[![SanderWind](https://avatars.githubusercontent.com/u/1670379?v=4)](https://github.com/SanderWind "SanderWind (2 commits)")[![alex-alvarado](https://avatars.githubusercontent.com/u/5059955?v=4)](https://github.com/alex-alvarado "alex-alvarado (1 commits)")[![spidfire](https://avatars.githubusercontent.com/u/156694?v=4)](https://github.com/spidfire "spidfire (1 commits)")[![crishoj](https://avatars.githubusercontent.com/u/20393?v=4)](https://github.com/crishoj "crishoj (1 commits)")[![chrisrenga](https://avatars.githubusercontent.com/u/13778529?v=4)](https://github.com/chrisrenga "chrisrenga (1 commits)")[![stillzombie](https://avatars.githubusercontent.com/u/4580799?v=4)](https://github.com/stillzombie "stillzombie (1 commits)")[![RobLui](https://avatars.githubusercontent.com/u/10846766?v=4)](https://github.com/RobLui "RobLui (1 commits)")[![cyberhicham](https://avatars.githubusercontent.com/u/10002527?v=4)](https://github.com/cyberhicham "cyberhicham (1 commits)")[![eduavila](https://avatars.githubusercontent.com/u/1779843?v=4)](https://github.com/eduavila "eduavila (1 commits)")[![gduymaz](https://avatars.githubusercontent.com/u/8122090?v=4)](https://github.com/gduymaz "gduymaz (1 commits)")[![jerodev](https://avatars.githubusercontent.com/u/3493941?v=4)](https://github.com/jerodev "jerodev (1 commits)")

---

Tags

qr codeqrcodelaraveldatamatrixpdf417barcodeeanCODABARCODE 39CODE 128

### Embed Badge

![Health badge](/badges/bulgarianhealer-barcode/health.svg)

```
[![Health](https://phpackages.com/badges/bulgarianhealer-barcode/health.svg)](https://phpackages.com/packages/bulgarianhealer-barcode)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bitgrave/barcode-bundle

provide barcode rendering service into your Symfony2 application.

25444.0k1](/packages/bitgrave-barcode-bundle)[jucksearm/php-barcode

Barcode Generation Package inspired by Nicola Asuni.

12362.6k1](/packages/jucksearm-php-barcode)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
