PHPackages                             lorenzofaresin/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. lorenzofaresin/twig-barcode

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

lorenzofaresin/twig-barcode
===========================

Symfony Bundle to generate barcodes within Twig

v1.1.4(5y ago)09PHP

Since Oct 8Pushed 5y agoCompare

[ Source](https://github.com/lorenzofaresin/twig-barcode)[ Packagist](https://packagist.org/packages/lorenzofaresin/twig-barcode)[ RSS](/packages/lorenzofaresin-twig-barcode/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (3)Versions (7)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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

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 ~98 days

Recently: every ~56 days

Total

6

Last Release

1917d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b208499e101eea142f219c1c60fdfd0f1a5b6ac99a3a430be5c5fdd36cd4219?d=identicon)[lfaresin](/maintainers/lfaresin)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M55](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21814.8M162](/packages/symfony-ux-twig-component)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)[symfony/ux-live-component

Live components for Symfony

1635.6M72](/packages/symfony-ux-live-component)[twig/html-extra

A Twig extension for HTML

777.6M41](/packages/twig-html-extra)

PHPackages © 2026

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