PHPackages                             tito/twig-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. [Templating &amp; Views](/categories/templating)
4. /
5. tito/twig-barcode

ActiveLibrary[Templating &amp; Views](/categories/templating)

tito/twig-barcode
=================

Symfony Bundle to generate barcodes within Twig

v1.0(6y ago)05PHP

Since Oct 8Pushed 6y agoCompare

[ Source](https://github.com/TiiToo/twig-barcode)[ Packagist](https://packagist.org/packages/tito/twig-barcode)[ RSS](/packages/tito-twig-barcode/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (2)Used By (0)

Twig Barcode
============

[](#twig-barcode)

Generate barcodes within twig

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

[](#installation)

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

```
composer require alpin11/twig-barcode
```

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

### Usage

[](#usage)

Simply use it like any other Twig function:

```
barcode_html_ean13(theBarcodeValue, widthFactor = 2, totalHeight = 30)
```

### Options

[](#options)

#### Width Factor

[](#width-factor)

With that option you can manipulate the width of the barcode. Default is `2`. That means, the generated width of the barcode will be multiplied with you width factor.

### Total Height

[](#total-height)

With that option you can set the height of the generated barcode. The default is value is `30`

### Supported Formats

[](#supported-formats)

#### HTML

[](#html)

```
barcode_html_*
```

#### SVG

[](#svg)

```
barcode_svg_*
```

#### PNG

[](#png)

```
barcode_png_*
```

#### JPG

[](#jpg)

```
barcode_jpg_*
```

### Supported Types

[](#supported-types)

TypeTwig FunctionTYPE\_CODE\_39`barcode_*_c39`TYPE\_CODE\_39\_CHECKSUM`barcode_*_c39_plus`TYPE\_CODE\_39E`barcode_*_c39e`TYPE\_CODE\_39E\_CHECKSUM`barcode_*_c39e_plus`TYPE\_CODE\_93`barcode_*_c93`TYPE\_STANDARD\_2\_5`barcode_*_s25`TYPE\_STANDARD\_2\_5\_CHECKSUM`barcode_*_s25_plus`TYPE\_INTERLEAVED\_2\_5`barcode_*_i25`TYPE\_INTERLEAVED\_2\_5\_CHECKSUM`barcode_*_i25_plus`

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

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

2459d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4389101?v=4)[TiiToo](/maintainers/TiiToo)[@TiiToo](https://github.com/TiiToo)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tito-twig-barcode/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.0k](/packages/craftcms-cms)[symfony/ux-live-component

Live components for Symfony

1647.0M126](/packages/symfony-ux-live-component)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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