PHPackages                             1tomany/pdf-pack - 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. 1tomany/pdf-pack

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

1tomany/pdf-pack
================

A simple PHP library that makes rasterizing pages and extracting text from PDFs for large language models easy

v0.7.2(3mo ago)491↓79.8%11MITPHPPHP &gt;=8.2

Since Mar 27Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/1tomany/pdf-pack)[ Packagist](https://packagist.org/packages/1tomany/pdf-pack)[ RSS](/packages/1tomany-pdf-pack/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (15)Versions (29)Used By (1)

PDF Extraction Library for PHP
==============================

[](#pdf-extraction-library-for-php)

`pdf-pack` is a simple PHP library that makes rasterizing pages and extracting text from PDFs for large language models easy. It uses a single dependency, the [Symfony Process Component](https://symfony.com/doc/current/components/process.html), to interface with the [Poppler command line tools from the xpdf library](https://poppler.freedesktop.org/).

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

[](#installation)

Install the library using Composer:

```
composer require 1tomany/pdf-pack
```

Installing Poppler
------------------

[](#installing-poppler)

Before beginning, ensure the `pdfinfo`, `pdftoppm`, and `pdftotext` binaries are installed and located in your `$PATH`.

### macOS

[](#macos)

```
brew install poppler
```

### Debian and Ubuntu

[](#debian-and-ubuntu)

```
apt-get install poppler-utils
```

Usage
-----

[](#usage)

This library has three main features:

- Read PDF metadata such as the number of pages
- Rasterize one or more pages to JPEG or PNG images
- Extract text from one or more pages

Extracted data is stored in memory and can be written to the filesystem or converted to a `data:` URI. Because extracted data is stored in memory, this library returns a `\Generator` object for each page that is extracted or rasterized.

Using the library is easy, and you have two ways to interact with it:

1. **Direct** Instantiate the `OneToMany\PdfPack\Client\Poppler\PopplerClient` class and call the methods directly. This method is easier to use, but comes with the cost that your application will be less flexible and testable.
2. **Actions** Create a container of `OneToMany\PdfPack\Contract\Client\ClientInterface` objects, and use the `OneToMany\PdfPack\Factory\ClientFactory` class to instantiate them.

**Note:** A [Symfony bundle](https://github.com/1tomany/pdf-pack-bundle) is available if you wish to integrate this library into your Symfony applications with autowiring and configuration support.

### Direct usage

[](#direct-usage)

See [`examples/direct.php`](https://github.com/1tomany/pdf-pack/blob/master/examples/direct.php).

Credits
-------

[](#credits)

- [Vic Cherubini](https://github.com/viccherubini), [1:N Labs, LLC](https://1tomany.com)

License
-------

[](#license)

The MIT License

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance81

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

Recently: every ~5 days

Total

25

Last Release

101d ago

PHP version history (2 changes)v0.0.1PHP &gt;=8.4

v0.5.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60762?v=4)[Vic Cherubini](/maintainers/viccherubini)[@viccherubini](https://github.com/viccherubini)

---

Top Contributors

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

---

Tags

pdfOCRpdf-to-textpdf-to-imagepdfinfoxpdfpdf2textpopplerpdftoppmpdf2imagepdf2imgpdf2txt

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/1tomany-pdf-pack/health.svg)

```
[![Health](https://phpackages.com/badges/1tomany-pdf-pack/health.svg)](https://phpackages.com/packages/1tomany-pdf-pack)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k36.7M156](/packages/spatie-browsershot)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[kimai/kimai

Kimai - Time Tracking

4.8k9.0k1](/packages/kimai-kimai)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)

PHPackages © 2026

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