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

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

sqkhor/publication-barcode
==========================

For generating ISBN and ISSN barcodes.

v1.0.2(2y ago)3231MITPHPPHP ^7.3|^8.0

Since Sep 14Pushed 2y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Barcode Generator for Publications
==================================

[](#barcode-generator-for-publications)

PHP script specifically for generating ISBN and ISSN barcodes.
It could be used to generate other EAN-13 barcodes too, though not designed to do so.

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

[](#installation)

You could either download everything in `src/` into your project, or install via composer:

```
composer require sqkhor/publication-barcode

```

Usage
-----

[](#usage)

```
use \SQKhor\Barcode\PublicationBarcode;

// ISBN
$barcode = new PublicationBarcode('978-967-2088-62-2');
$svg = $barcode->render('svg');

// ISBN with add on
$barcode = new PublicationBarcode('978-967-2088-62-2', '50999');
$png = $barcode->render('svg');

// ISSN with issue number
$barcode = new PublicationBarcode('3009-1004', '01');
$svg = $barcode->svg();
```

Method Parameters
-----------------

[](#method-parameters)

`new PublicationBarcode(code, [addon])`

**code** (*string*)
The 13-digit ISBN / ISSN, or 8-digit ISSN code

**addon** (*?string*)
Supplimentary barcode data for price (ISBN) and issue number (ISSN)

`render(format)`

**format** (*string*)
Either one of these: svg | png | jpg | jpeg

### Shorthands

[](#shorthands)

```
$barcode = new PublicationBarcode('978-967-2088-62-2');
$svg = $barcode->svg();
$png = $barcode->png();
$jpg = $barcode->jpg();
```

Sample
------

[](#sample)

ISBN:
[![](sample-isbn.svg)](sample-isbn.svg)

ISSN with issue number:
[![](sample-issn.svg)](sample-issn.svg)

To-Do
-----

[](#to-do)

- PNG / JPG render capability
- Class parameters to set bar width &amp; height
- Reset after every use
- Error handling
- Comments / documentations
- Tests

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~19 days

Total

3

Last Release

939d ago

### Community

Maintainers

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

---

Top Contributors

[![shuqikhor](https://avatars.githubusercontent.com/u/7521763?v=4)](https://github.com/shuqikhor "shuqikhor (19 commits)")

---

Tags

barcodeeanISBNISSN

### Embed Badge

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

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

###  Alternatives

[mike42/escpos-php

PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers

2.7k1.9M22](/packages/mike42-escpos-php)[bitgrave/barcode-bundle

provide barcode rendering service into your Symfony2 application.

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

ISBN library

88524.8k6](/packages/fale-isbn)[barcode-bakery/barcode-1d

Generates 1D barcodes from a PHP server to a file or HTML document.

10146.1k1](/packages/barcode-bakery-barcode-1d)[z38/metzli

PHP library to generate Aztec barcodes

26315.2k](/packages/z38-metzli)

PHPackages © 2026

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