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

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

interficieis/php-barcode
========================

Barcode Generation Package inspired by Nicola Asuni.

v2.0.2(5y ago)037.8k↑42.9%LGPL-3.0-onlyPHPPHP &gt;=7.4.0

Since Jun 5Pushed 2y agoCompare

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

READMEChangelogDependencies (1)Versions (7)Used By (0)

[![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

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~340 days

Total

5

Last Release

1910d ago

Major Versions

1.0.1 → v2.0.02021-01-20

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

v2.0.2PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/79e3a3e748c9219690d4049eb7615edc5c5144414ce9c212f057e6abddbd129b?d=identicon)[damart80](/maintainers/damart80)

---

Top Contributors

[![damart80](https://avatars.githubusercontent.com/u/19341266?v=4)](https://github.com/damart80 "damart80 (3 commits)")[![jucksearm](https://avatars.githubusercontent.com/u/20037439?v=4)](https://github.com/jucksearm "jucksearm (2 commits)")[![kilburn](https://avatars.githubusercontent.com/u/116100?v=4)](https://github.com/kilburn "kilburn (1 commits)")

---

Tags

qr codeqrcodedatamatrixpdf417barcodeCODE 128php barcode

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

Barcode Generation Package inspired by Nicola Asuni.

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

provide barcode rendering service into your Symfony2 application.

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

simple barcode generator base classes supporting 2d- and datamatrix barcodes

1313.7k](/packages/bitgrave-barcode-generator)

PHPackages © 2026

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