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)834.3k—5.9%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 1mo ago

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

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity49

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

1130d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82e25ee9c2189d89148b77cb15477330861242577535ff77a73773aba317e369?d=identicon)[leongrdic](/maintainers/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

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.2k57.6M131](/packages/openspout-openspout)[lsnepomuceno/laravel-a1-pdf-sign

Sign PDF files with valid x509 certificates

315101.4k](/packages/lsnepomuceno-laravel-a1-pdf-sign)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

426.1M30](/packages/setasign-tfpdf)

PHPackages © 2026

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