PHPackages                             bilalswiftsolutions/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. bilalswiftsolutions/barcode

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

bilalswiftsolutions/barcode
===========================

Barcode &amp; Qr Code generator library. You can use it with Custom PHP application or any PHP Framework such as Laravel, Cakephp, Yii, Codeigneter etc.

212.6k↓42.7%3[1 issues](https://github.com/bilalswiftsolutions/barcode/issues)PHP

Since Jul 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bilalswiftsolutions/barcode)[ Packagist](https://packagist.org/packages/bilalswiftsolutions/barcode)[ RSS](/packages/bilalswiftsolutions-barcode/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Requirements
------------

[](#requirements)

You must have php &gt;= 5.3.2 installed and GD extension enabled.

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

[](#installation--)

CodeItNow Barcode &amp; Qr Code Generator can install by composer.

```
composer require bilalswiftsolutions/barcode

```

Uses -
------

[](#uses--)

Barcode and Qr Code Generator library give output as base64 encoded png image.

### Example - QrCode:

[](#example---qrcode)

```
use CodeItNow\BarcodeBundle\Utils\QrCode;

$qrCode = new QrCode();
$qrCode
    ->setText('QR code by codeitnow.in')
    ->setSize(300)
    ->setPadding(10)
    ->setErrorCorrection('high')
    ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))
    ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))
    ->setLabel('Scan Qr Code')
    ->setLabelFontSize(16)
    ->setImageType(QrCode::IMAGE_TYPE_PNG)
;
echo '';
```

### Sample Image - QrCode:

[](#sample-image---qrcode)

[![CodeItNow QrCode Generator](/CodeItNow/BarcodeBundle/Resources/image/sample_qrcode.png?raw=true)](/CodeItNow/BarcodeBundle/Resources/image/sample_qrcode.png?raw=true)

### Example - Code128:

[](#example---code128)

```
use CodeItNow\BarcodeBundle\Utils\BarcodeGenerator;

$barcode = new BarcodeGenerator();
$barcode->setText("0123456789");
$barcode->setType(BarcodeGenerator::Code128);
$barcode->setScale(2);
$barcode->setThickness(25);
$barcode->setFontSize(10);
$code = $barcode->generate();

echo '';
```

### Example - Codabar:

[](#example---codabar)

```
$barcode->setText("A0123456789C");
$barcode->setType(BarcodeGenerator::Codabar);
```

### Example - Code11:

[](#example---code11)

```
$barcode->setText("0123456789");
$barcode->setType(BarcodeGenerator::Code11);
```

### Example - Code39:

[](#example---code39)

```
$barcode->setText("0123456789");
$barcode->setType(BarcodeGenerator::Code39);
```

### Example - Code39-Extended:

[](#example---code39-extended)

```
$barcode->setText("0123456789");
$barcode->setType(BarcodeGenerator::Code39Extended);
```

### Example - Ean128:

[](#example---ean128)

```
$barcode->setText("00123456789012345675");
$barcode->setType(BarcodeGenerator::Ean128);
```

### Example - Gs1128:

[](#example---gs1128)

```
$barcode->setText("00123456789012345675");
$barcode->setType(BarcodeGenerator::Gs1128);
```

### Example - Gs1128 (with no length limit and unknown identifier):

[](#example---gs1128-with-no-length-limit-and-unknown-identifier)

```
$barcode->setText("4157707266014651802001012603068039000000006377069620171215");
$barcode->setType(BarcodeGenerator::Gs1128);
$barcode->setNoLengthLimit(true);
$barcode->setAllowsUnknownIdentifier(true);
```

### Example - I25:

[](#example---i25)

```
$barcode->setText("00123456789012345675");
$barcode->setType(BarcodeGenerator::I25);
```

### Example - Isbn:

[](#example---isbn)

```
$barcode->setText("0012345678901");
$barcode->setType(BarcodeGenerator::Isbn);
```

### Example - Msi:

[](#example---msi)

```
$barcode->setText("0012345678901");
$barcode->setType(BarcodeGenerator::Msi);
```

### Example - Postnet:

[](#example---postnet)

```
$barcode->setText("01234567890");
$barcode->setType(BarcodeGenerator::Postnet);
```

### Example - S25:

[](#example---s25)

```
$barcode->setText("012345678901");
$barcode->setType(BarcodeGenerator::S25);
```

### Example - Upca:

[](#example---upca)

```
$barcode->setText("012345678901");
$barcode->setType(BarcodeGenerator::Upca);
```

### Example - Upca:

[](#example---upca-1)

```
$barcode->setText("012345");
$barcode->setType(BarcodeGenerator::Upce);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8caae99092d6c66863f4d734d69364bc17ba9d06541c7a39cbe6f072ec5e624?d=identicon)[bilalswiftsolutions](/maintainers/bilalswiftsolutions)

---

Top Contributors

[![bilalswiftsolutions](https://avatars.githubusercontent.com/u/57621713?v=4)](https://github.com/bilalswiftsolutions "bilalswiftsolutions (3 commits)")[![ramay2088](https://avatars.githubusercontent.com/u/74799306?v=4)](https://github.com/ramay2088 "ramay2088 (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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