PHPackages                             athos/haru-ffi - 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. athos/haru-ffi

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

athos/haru-ffi
==============

libHaru FFI bindings compatible with the Haru PECL extension

0.2.1(3y ago)06BSD-2-ClausePHPPHP &gt;=8

Since Apr 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/athos-ribeiro/haru-ffi)[ Packagist](https://packagist.org/packages/athos/haru-ffi)[ Docs](https://github.com/athos-ribeiro/haru-ffi)[ RSS](/packages/athos-haru-ffi/feed)WikiDiscussions main Synced 1mo ago

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

PHP libHaru FFI
===============

[](#php-libharu-ffi)

[libHaru](http://libharu.org/) is a library for generating PDF files.

This is a PHP FFI Haru bindings implementation created to be compatible with the now unmaintained [PHP Haru PECL extension](https://pecl.php.net/package/haru).

How to use this library
-----------------------

[](#how-to-use-this-library)

For now, please, check the examples at `tests/UsageExamplesTest.php` or the unmaintained PECL extension documentation. If you are missing any specific features, do not hesitate to file an issue here so we can better prioritize.

### Requirements

[](#requirements)

This library is being developed with PHP &gt;= 8.1. It is currently not tested with lower PHP versions. Moreover, note that the FFI extension is quite recent and this library may not work as intended in previous PHP versions.

You will need to have libharu installed in your sysyem to use this library.

In Debian, Ubuntu, or any derivatives, you can install it by running

```
sudo apt install libhpdf-2.3.0

```

In Fedora, RHEL or any derivatives, you can install it by running

```
sudo dnf install libhharu

```

Finally, your PHP installation must support FFI since this library is a set of bindings to an underlying C library.

### Development

[](#development)

As long as you have PHP &gt;= 8, composer, and libharu installed in your system, running `make check` should get you started by running our unit tests and any additional checks.

Feel free to submit Pull Requests or file issues in our repository at .

Current development state
-------------------------

[](#current-development-state)

As of version `0.x.y`, this initial, minimal version of haru-ffi is only enough to

- generate the PDF version of the PHP documentation in [phd](https://github.com/php/phd). This version was extracted from [our phd pdf generation pull request](https://github.com/php/phd/pull/69); and
- run the examples described in `tests/UsageExamplesTest.php`.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

3

Last Release

1120d ago

### Community

Maintainers

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

---

Top Contributors

[![athos-ribeiro](https://avatars.githubusercontent.com/u/2052794?v=4)](https://github.com/athos-ribeiro "athos-ribeiro (46 commits)")

---

Tags

pdf

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/athos-haru-ffi/health.svg)

```
[![Health](https://phpackages.com/badges/athos-haru-ffi/health.svg)](https://phpackages.com/packages/athos-haru-ffi)
```

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M278](/packages/barryvdh-laravel-dompdf)[tecnickcom/tcpdf

TCPDF is a PHP class for generating PDF documents and barcodes.

4.5k101.8M473](/packages/tecnickcom-tcpdf)[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k77.1M493](/packages/mpdf-mpdf)[knplabs/knp-snappy

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.

4.5k68.3M56](/packages/knplabs-knp-snappy)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)

PHPackages © 2026

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