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

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

kollway/php-barcode-generator
=============================

forked from http://github.com/picqer/php-barcode-generator

1.0.0(8y ago)3113LGPLv3PHPPHP &gt;=5.4.0

Since Nov 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/kollway-app/php-barcode-generator)[ Packagist](https://packagist.org/packages/kollway/php-barcode-generator)[ Docs](http://github.com/picqer/php-barcode-generator)[ RSS](/packages/kollway-php-barcode-generator/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

PHP Barcode Generator [![Build Status](https://camo.githubusercontent.com/d1d75efe07313ca7dca2005b482392f90d5cb8e31aacff68f87f35d0de3ade81/68747470733a2f2f7472617669732d63692e6f72672f7069637165722f7068702d626172636f64652d67656e657261746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/picqer/php-barcode-generator) [![Total Downloads](https://camo.githubusercontent.com/de932465e39d40e2fc2681bab7d0f2caab78264e7672e333bdc461cd377f4b11/68747470733a2f2f706f7365722e707567782e6f72672f7069637165722f7068702d626172636f64652d67656e657261746f722f646f776e6c6f616473)](https://packagist.org/packages/picqer/php-barcode-generator)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#php-barcode-generator--)

This is an easy to use, non-bloated, framework independent, barcode generator in PHP.

It creates SVG, PNG, JPG and HTML images, from the most used 1D barcode standards.

*The codebase is largely from the [TCPDF barcode generator](https://github.com/tecnickcom/TCPDF) by Nicola Asuni. This code is therefor licensed under LGPLv3. It is still a bit of a mess, bit I will clean it in the future. I do not expect the interface of this class will change during the clean ups.*

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

[](#installation)

Install through [composer](https://getcomposer.org/doc/00-intro.md):

```
composer require picqer/php-barcode-generator

```

If you want to generate PNG or JPG images, you need the GD library or Imagick installed on your system as well.

Usage
-----

[](#usage)

Initiate the barcode generator for the output you want, then call the -&gt;getBarcode() routine as many times as you want.

```
$generator = new Picqer\Barcode\BarcodeGeneratorHTML();
echo $generator->getBarcode('081231723897', $generator::TYPE_CODE_128);
```

The -&gt;getBarcode() routine accepts the following:

- $code Data for the barcode
- $type Type of barcode, use the constants defined in the class
- $widthFactor Width is based on the length of the data, with this factor you can make the barcode bars wider than default
- $totalHeight The total height of the barcode
- $color Hex code of the foreground color

Image types
-----------

[](#image-types)

```
$generatorSVG = new Picqer\Barcode\BarcodeGeneratorSVG();
$generatorPNG = new Picqer\Barcode\BarcodeGeneratorPNG();
$generatorJPG = new Picqer\Barcode\BarcodeGeneratorJPG();
$generatorHTML = new Picqer\Barcode\BarcodeGeneratorHTML();
```

Accepted types
--------------

[](#accepted-types)

- TYPE\_CODE\_39
- TYPE\_CODE\_39\_CHECKSUM
- TYPE\_CODE\_39E
- TYPE\_CODE\_39E\_CHECKSUM
- TYPE\_CODE\_93
- TYPE\_STANDARD\_2\_5
- TYPE\_STANDARD\_2\_5\_CHECKSUM
- TYPE\_INTERLEAVED\_2\_5
- TYPE\_INTERLEAVED\_2\_5\_CHECKSUM
- TYPE\_CODE\_128
- TYPE\_CODE\_128\_A
- TYPE\_CODE\_128\_B
- TYPE\_CODE\_128\_C
- TYPE\_EAN\_2
- TYPE\_EAN\_5
- TYPE\_EAN\_8
- TYPE\_EAN\_13
- TYPE\_UPC\_A
- TYPE\_UPC\_E
- TYPE\_MSI
- TYPE\_MSI\_CHECKSUM
- TYPE\_POSTNET
- TYPE\_PLANET
- TYPE\_RMS4CC
- TYPE\_KIX
- TYPE\_IMB
- TYPE\_CODABAR
- TYPE\_CODE\_11
- TYPE\_PHARMA\_CODE
- TYPE\_PHARMA\_CODE\_TWO\_TRACKS

Examples
--------

[](#examples)

Embedded PNG image in HTML:

```
$generator = new \Picqer\Barcode\BarcodeGeneratorPNG();
echo '';
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

3095d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e388ff3091bb9b41608e36328fb1ab087eae0ddc633dd814f2b62dd9f8cc475?d=identicon)[kollway](/maintainers/kollway)

---

Top Contributors

[![kollway-app](https://avatars.githubusercontent.com/u/16223088?v=4)](https://github.com/kollway-app "kollway-app (1 commits)")

### Embed Badge

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

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

###  Alternatives

[baidu/aip-sdk

baidu pulic ai php sdk

119104.9k6](/packages/baidu-aip-sdk)[thestringler-laravel/manipulator

A Laravel package for The Stringler

315.0k](/packages/thestringler-laravel-manipulator)

PHPackages © 2026

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