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

ActiveLibrary

jucksearm/php-barcode
=====================

Barcode Generation Package inspired by Nicola Asuni.

1.0.2(2y ago)12362.6k—9.9%23[7 issues](https://github.com/jucksearm/php-barcode/issues)1LGPL-3.0-or-laterPHPPHP &gt;=5.4.0

Since Jun 5Pushed 9mo ago3 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (4)Used By (1)

[![Packagist Downloads](https://camo.githubusercontent.com/e27571e9841ab677dd1e99ca8ec5004211fcf665a7f9eadeed62f7e437adfb47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75636b736561726d2f7068702d626172636f64652e737667)](https://packagist.org/packages/jucksearm/php-barcode) [![Stable version](https://camo.githubusercontent.com/d80af1e47ef2339d5cfe7449d830ae7964264d50e1d4604c151a97e2fa5084da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75636b736561726d2f7068702d626172636f64652e737667)](https://packagist.org/packages/jucksearm/php-barcode) [![License](https://camo.githubusercontent.com/660cfd9de692bd0fef5cd3125c761fb2c96a3caff3db490d6fc032438bf74dcc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a75636b736561726d2f7068702d626172636f64652e737667)](https://packagist.org/packages/jucksearm/php-barcode)

This is a barcode generation package inspired by [Nicola Asuni](https://github.com/tecnickcom/TCPDF). Actually I use that package's underline classes for generating barcode. This package is just a wrapper of that package and adds compatibility with PHP &gt;= 5.4

I used the following classes of that package.

- lib/Barcode1D.php ([tcpdf\_barcodes\_1d.php](https://github.com/tecnickcom/TCPDF/blob/master/tcpdf_barcodes_1d.php))
- lib/Barcode2D.php ([tcpdf\_barcodes\_2d.php](https://github.com/tecnickcom/TCPDF/blob/master/tcpdf_barcodes_2d.php))
- lib/QRcode.php ([include/barcodes/qrcode.php](https://github.com/tecnickcom/TCPDF/blob/master/include/barcodes/qrcode.php))
- lib/Datamatrix.php ([include/barcodes/datamatrix.php](https://github.com/tecnickcom/TCPDF/blob/master/include/barcodes/datamatrix.php))
- lib/PDF417.php ([include/barcodes/pdf417.php](https://github.com/tecnickcom/TCPDF/blob/master/include/barcodes/pdf417.php))

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

Support
-------

[](#support)

Barcode generator like QRCode, PDF417, Datamatrix, 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 and SVG.

This package is compatible with PHP &gt;= 5.4
---------------------------------------------

[](#this-package-is-compatible-with-php--54)

This package require [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 jucksearm/php-barcode

```

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

```
"require": {
    ...
    "jucksearm/php-barcode": "^1.0"
}

```

Next, update Composer from the terminal:

```
composer update

```

How to Use Basic
----------------

[](#how-to-use-basic)

```
use jucksearm\barcode\Barcode;

Barcode::html('https://github.com/jucksearm/php-barcode', 'C128');
```

How to Use Advance
------------------

[](#how-to-use-advance)

```
use jucksearm\barcode\Barcode;

Barcode::factory()
  ->setCode('https://github.com/jucksearm/php-barcode')
  ->setType('C128')
  ->setScale(null)
  ->setHeight(null)
  ->setRotate(null)
  ->setColor(null)
  ->renderHTML();
```

[See More Examples](https://github.com/jucksearm/php-barcode/tree/master/examples)

Barcode Option
--------------

[](#barcode-option)

```
Barcode::html($code, $type, $scale = null, $height = null, $rotate = null, $color = null)

Barcode::png($code, $type, $file= null, $scale = null, $height = null, $rotate = null, $color = null)

Barcode::svg($code, $type, $file= null, $scale = null, $height = null, $rotate = null, $color = null)
```

```
$type    C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, EAN2, EAN5, EAN8, EAN13, UPCA, UPCE, MSI, MSI+, POSTNET, PLANET, RMS4CC, KIX, IMB, CODABAR, CODE11, PHARMA, PHARMA2T
$file    Barcode save filename [default: `null`]
$scale   Barcode unit size in `px` units [default: `1`]
$height  Barcode height in `px` units [default: `30`]
$rotate  Support 0, 90 in `degrees` units [default: `0`]
$color   Support in `hexadecimal` color units [default: `000`]
```

QRcode Option
-------------

[](#qrcode-option)

```
QRcode::html($code, $emblem = null, $level = null, $size = null, $margin = null, $color = null)

QRcode::png($code, $emblem = null, $file = null, $level = null, $size = null, $margin = null, $color = null)

QRcode::svg($code, $emblem = null, $file = null, $level = null, $size = null, $margin = null, $color = null)
```

```
$emblem  Insert mask Logo [default: `null`]
$file    QRcode save filename [default: `null`]
$level   QRcode level L,M,Q,H [default: `L`]
$size    QRcode width and height size in `px` units [default: `100`]
$margin  QRcode empty space in `percentage` units [default: `1`]
$color   Support in `hexadecimal` color units [default: `000`]
```

Datamatrix Option
-----------------

[](#datamatrix-option)

```
Datamatrix::html($code, $size = null, $margin = null, $color = null)

Datamatrix::png($code, $file = null, $size = null, $margin = null, $color = null)

Datamatrix::svg($code, $file = null, $size = null, $margin = null, $color = null)
```

```
$file    Datamatrix save filename [default: `null`]
$size    Datamatrix width and height size in `px` units [default: `100`]
$margin  Datamatrix empty space in `percentage` units [default: `1`]
$color   Support in `hexadecimal` color units [default: `000`]
```

PDF417 Option
-------------

[](#pdf417-option)

```
PDF417::html($code, $size = null, $margin = null, $color = null)

PDF417::png($code, $file = null, $size = null, $margin = null, $color = null)

PDF417::svg($code, $file = null, $size = null, $margin = null, $color = null)
```

```
$file    PDF417 save filename [default: `null`]
$size    PDF417 width and height size in `px` units [default: `100`]
$margin  PDF417 empty space in `percentage` units [default: `1`]
$color   Support in `hexadecimal` color units [default: `000`]
```

License
-------

[](#license)

This package is published under `GNU LGPLv3` license and copyright to [Jucksearm Boonmor](https://github.com/jucksearm/php-barcode). Original Barcode generation classes were written by [Nicola Asuni](https://github.com/tecnickcom/barcode). The license agreement is on project's root.

License: GNU LGPLv3

- **Original Package** Nicola Asuni
- **Link**
- **Package Copyright** Jucksearm Boonmor

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 63.6% 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 ~1127 days

Total

3

Last Release

1016d ago

### Community

Maintainers

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

---

Top Contributors

[![jucksearm](https://avatars.githubusercontent.com/u/20037439?v=4)](https://github.com/jucksearm "jucksearm (7 commits)")[![LeonardoSilva-10](https://avatars.githubusercontent.com/u/73613289?v=4)](https://github.com/LeonardoSilva-10 "LeonardoSilva-10 (2 commits)")[![luiz-abreu](https://avatars.githubusercontent.com/u/94118542?v=4)](https://github.com/luiz-abreu "luiz-abreu (1 commits)")[![WAS33M](https://avatars.githubusercontent.com/u/3297129?v=4)](https://github.com/WAS33M "WAS33M (1 commits)")

---

Tags

qr codeqrcodedatamatrixpdf417barcodeCODE 128php barcode

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/jucksearm-php-barcode/health.svg)](https://phpackages.com/packages/jucksearm-php-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)[tecnickcom/tc-lib-barcode

PHP library to generate linear and bidimensional barcodes

2957.1M28](/packages/tecnickcom-tc-lib-barcode)[bitgrave/barcode-bundle

provide barcode rendering service into your Symfony2 application.

25444.0k1](/packages/bitgrave-barcode-bundle)

PHPackages © 2026

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