PHPackages                             leongrdic/pdf417 - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. leongrdic/pdf417

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

leongrdic/pdf417
================

PDF417 barcode generation PHP library

1.0.0(3y ago)848.2k↑112.4%21MITPHPPHP ^8.0

Since Apr 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/leongrdic/php-pdf417)[ Packagist](https://packagist.org/packages/leongrdic/pdf417)[ RSS](/packages/leongrdic-pdf417/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

PHP PDF417 generator
====================

[](#php-pdf417-generator)

[![release](https://camo.githubusercontent.com/4b801faaffa78b6806fa49e9305f38c2c1f3a28404a51e791a131425526fc01d/687474703a2f2f706f7365722e707567782e6f72672f6c656f6e67726469632f7064663431372f76)](https://packagist.org/packages/leongrdic/pdf417)[![php-version](https://camo.githubusercontent.com/5a4ca5392340497b25c89cc825da5b5754a34d337753331aab6721474787d233/687474703a2f2f706f7365722e707567782e6f72672f6c656f6e67726469632f7064663431372f726571756972652f706870)](https://packagist.org/packages/leongrdic/pdf417)[![license](https://camo.githubusercontent.com/a2e4e9b048a7bf75bb3e5a53aef12be897ef8bef13fef9af4d63ad312bd46d7a/687474703a2f2f706f7365722e707567782e6f72672f6c656f6e67726469632f7064663431372f6c6963656e7365)](https://packagist.org/packages/leongrdic/pdf417)[![run-tests](https://github.com/leongrdic/php-pdf417/actions/workflows/test.yml/badge.svg)](https://github.com/leongrdic/php-pdf417/actions/workflows/test.yml)

This is a fork of [pdf417-php library by ihabunek](https://github.com/ihabunek/pdf417-php), attempting to keep it's legacy alive as it appears to be the only open source PDF417 generation library for PHP. You can see the [main differences](#migration-from-ihabunekpdf417-php) below. It has been updated a bit mainly fixing a PHP 8.2 incompatibility issue and merging a few PRs. The idea is to eventually refactor all components and optimize the encoding algorithm. Thus, any contributions are more than welcome!

Requirements
------------

[](#requirements)

- PHP 8.0+
- Extensions:
    - fileinfo
    - bcmath
    - dom
    - gd
    - simplexml (for running tests)

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

[](#installation)

```
composer require leongrdic/pdf417
```

Usage
-----

[](#usage)

```
$pdf417 = new \Le\PDF417\PDF417;
$pdf417->setColumns(15); // optionally set the number of columns
$pdf417->setSecurityLevel(4); // optionally set the security level
$pdf417->setForceBinary(); // optionally force binary encoding

$content = 'Lorem ipsum dolor sit amet.';
$data = $pdf417->encode($content);

$imageRenderer = new \Le\PDF417\Renderer\ImageRenderer([
    // below are default values
    'format' => 'png', // jpg, png, gif, tif, bmp or data-url
    'quality' => 90, // jpeg quality 1-100
    'scale' => 3, // elements scale 1-20
    'ratio' => 3, // height to width aspect 1-10
    'padding' => 20, // padding in px 0-50
    'color' => '#000000', // elements color hex code
    'bgColor' => '#ffffff', // background color hex code
]);

$image = ->render($data)->render($data);
$image instanceof \Intervention\Image\Image; // true

$svgRenderer = new \Le\PDF417\Renderer\SvgRenderer([
    // below are default values
    'scale' => 3, // elements scale 1-20
    'ratio' => 3, // height to width aspect 1-10
    'color' => 'black', // elements color
]);

$svg = $svgRenderer->render($data);
```

### Migration from [ihabunek/pdf417-php](https://github.com/ihabunek/pdf417-php)

[](#migration-from-ihabunekpdf417-php)

- Notable namespace changes

```
BigFish\PDF417\PDF417                   =>  Le\PDF417\PDF417
BigFish\PDF417\Renderers\ImageRenderer  =>  Le\PDF417\Renderer\ImageRenderer
BigFish\PDF417\Renderers\SvgRenderer    =>  Le\PDF417\Renderer\SvgRenderer
```

- Added types to all properties and method parameters and returns

Contributions
-------------

[](#contributions)

Please help this library by testing it and submitting PRs for any fixes or improvement. Thank you!

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

1175d ago

### Community

Maintainers

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

---

Top Contributors

[![ihabunek](https://avatars.githubusercontent.com/u/482138?v=4)](https://github.com/ihabunek "ihabunek (89 commits)")[![leongrdic](https://avatars.githubusercontent.com/u/6260068?v=4)](https://github.com/leongrdic "leongrdic (15 commits)")[![Fl0Cri](https://avatars.githubusercontent.com/u/16371551?v=4)](https://github.com/Fl0Cri "Fl0Cri (2 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (2 commits)")[![gjuric](https://avatars.githubusercontent.com/u/223015?v=4)](https://github.com/gjuric "gjuric (1 commits)")[![wotan192](https://avatars.githubusercontent.com/u/8224076?v=4)](https://github.com/wotan192 "wotan192 (1 commits)")[![Woutwo](https://avatars.githubusercontent.com/u/1227599?v=4)](https://github.com/Woutwo "Woutwo (1 commits)")

---

Tags

barcode-generatorpdf417phpphp8

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/leongrdic-pdf417/health.svg)

```
[![Health](https://phpackages.com/badges/leongrdic-pdf417/health.svg)](https://phpackages.com/packages/leongrdic-pdf417)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k172.1k9](/packages/bagisto-bagisto)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.5M85](/packages/unisharp-laravel-filemanager)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[aimeos/aimeos-core

Full-featured e-commerce components for high performance online shops

4.5k361.1k75](/packages/aimeos-aimeos-core)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)[code16/sharp

Laravel Content Management Framework

79164.7k8](/packages/code16-sharp)

PHPackages © 2026

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