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

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

rafikhaceb/pi-barcode
=====================

Composer ready for pi\_barcode (https://www.pitoo.com/codes-a-barres-p3)

2.0(3y ago)015.0k↓41.2%1[1 issues](https://github.com/RafikHaceb/PiBarCode/issues)PHPPHP ^7.2 || ^8.0

Since Oct 8Pushed 2y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

PiBarCode
=========

[](#pibarcode)

Composer ready for [pi\_barcode](https://www.pitoo.com/codes-a-barres-p3).

A php script that allows you to generate images or insert barcodes into your web pages in the following formats :

- Code 128 (Set B et C)
- Code 25 standard et code 25 Entrelacé
- Code MSI
- Code 39
- Code 11
- Code KIX
- Code CMC7
- Code PostFix
- Codabar
- Code UPC / EAN 8 et 13

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

[](#installation)

The best way to add the library to your project is using [composer](http://getcomposer.org).

```
$ composer require rafikhaceb/pi-barcode

```

Usage
-----

[](#usage)

```
// initialisation
use PiBarCode\PiBarCodeGenerator;

PiBarCodeGenerator::generate('123456789012', 'EAN', 150, 0, true);
```

Or

```
// initialisation
use PiBarCode\PiBarCode;

$bc = new PiBarCode();

// Code to generate
$bc->setCode('123456789012');

// Set code type : EAN, UPC, C39...
$bc->setType('EAN');

// Image size (height, width, quiet areas)
//    min Height = 15px
//    image width (can not be less than the space needed for the barcode)
//    quiet areas (mini = 10px) to the left and to the right of barcode
$bc->setSize(150);

// Text under the bars :
//    'AUTO' : displays the barcode value
//    '' : does not display text under the code
//    'text to display' : displays a free textu nder the bars
//$bc->setText('AUTO');

// If called, this method disables code type printing (EAN, C128...)
$bc->hideCodeType();

// Colors of the Bars and the Background in the format '#rrggbb'
$bc->setColors('#123456', '#F9F9F9');

// File type: GIF or PNG (default)
$bc->setFileType('PNG');

// Send the image to a file
//$bc->writeBarcodeFile('barcode.png');

// Or send the image to the browser
$bc->showBarcodeImage();
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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

Every ~1403 days

Total

2

Last Release

1375d ago

Major Versions

1.0 → 2.02022-08-12

PHP version history (2 changes)1.0PHP ^5.3.3 || ^7.0

2.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/21fd2367940e6e73c0d49fc25ec99930c78b4744d97f96ae5503fc0edfb70bdd?d=identicon)[rafikhaceb](/maintainers/rafikhaceb)

---

Top Contributors

[![rhabkg](https://avatars.githubusercontent.com/u/146323538?v=4)](https://github.com/rhabkg "rhabkg (30 commits)")

### Embed Badge

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

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

###  Alternatives

[jalendport/craft-readtime

Calculate the estimated read time for content.

1052.3k](/packages/jalendport-craft-readtime)

PHPackages © 2026

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