PHPackages                             benconda/php-pdfium - 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. benconda/php-pdfium

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

benconda/php-pdfium
===================

PHP implementation of PDFium C++ library

0.1.0(3mo ago)491[1 PRs](https://github.com/benconda/php-pdfium/pulls)MITCPHP &gt;=8.2CI passing

Since Feb 2Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/benconda/php-pdfium)[ Packagist](https://packagist.org/packages/benconda/php-pdfium)[ RSS](/packages/benconda-php-pdfium/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (8)Versions (6)Used By (0)

[![Packagist Version](https://camo.githubusercontent.com/24190d06d184202737c1a27501f84092856c28ddf565eb80f59c832f406073e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656e636f6e64612f7068702d70646669756d)](https://packagist.org/packages/benconda/php-pdfium)

Experimental
============

[](#experimental)

This is a first attempt to implement PDFium in PHP using FFI. Pdfium is a C++ library supported by Google team to render, manipulate and extract data from PDF.

Contribution are welcome.

Currently working
=================

[](#currently-working)

On PDF Document :

- Getting page count
- Iterate through Document pages

On each Page :

- Get pages size in point
- Render a page into a .png
- Iterate through page annotations
- Iterate through page fields

On each Annotation :

- Get the annotation type (enum) and index

On each FormField :

- Get the type (enum), value, name, alternateName, exportValue, formControlCount, formControlIndex, isChecked (for checkbox and radiobutton)

**About page rendering, this only works thanks to libvips integration, it's the only way to get a fast rendering**

Feel free to look in the tests to know how it works.

Remaining works
===============

[](#remaining-works)

There is still a lot of work to do, could be great to have the ability to edit PDF files. At least for adding forms fields on page, and fill them.

Development
===========

[](#development)

Here is the Google pdfium repository  there is some tests and C samples inside.

The public directory contains the headers, that we have access in this repository docker image (take a look at the Dockerfile)

Note : We use pre-compiled libraries for pdfium and libvips for simplicity.

On Docker image build, libraries headers are available in `/usr/lib-pdfium` and `/usr/lib-vips` directories

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance82

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~156 days

Total

3

Last Release

95d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20043165?v=4)[Benoit Condaminet](/maintainers/benconda)[@benconda](https://github.com/benconda)

---

Top Contributors

[![benconda](https://avatars.githubusercontent.com/u/20043165?v=4)](https://github.com/benconda "benconda (10 commits)")[![forfin](https://avatars.githubusercontent.com/u/7200907?v=4)](https://github.com/forfin "forfin (1 commits)")

---

Tags

librarypdfpdf-viewerpdfiumphp

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/benconda-php-pdfium/health.svg)

```
[![Health](https://phpackages.com/badges/benconda-php-pdfium/health.svg)](https://phpackages.com/packages/benconda-php-pdfium)
```

###  Alternatives

[intervention/image-driver-vips

libvips driver for Intervention Image

48177.4k11](/packages/intervention-image-driver-vips)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

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