PHPackages                             xp-forge/pdf-parser - 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. xp-forge/pdf-parser

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

xp-forge/pdf-parser
===================

PDF Parser

v0.1.0(1mo ago)089↓72.2%BSD-3-ClausePHPPHP &gt;=7.4.0CI passing

Since May 30Pushed 1mo agoCompare

[ Source](https://github.com/xp-forge/pdf-parser)[ Packagist](https://packagist.org/packages/xp-forge/pdf-parser)[ Docs](http://xp-framework.net/)[ RSS](/packages/xp-forge-pdf-parser/feed)WikiDiscussions main Synced 1w ago

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

PDF Parser
==========

[](#pdf-parser)

[![Build status on GitHub](https://github.com/xp-forge/pdf-parser/workflows/Tests/badge.svg)](https://github.com/xp-forge/pdf-parser/actions)[![XP Framework Module](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)[![Requires PHP 7.4+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_4plus.svg)](http://php.net/)[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)[![Latest Stable Version](https://camo.githubusercontent.com/7ca0f442b8b754e06956ddd2bb426dce40d63866060172af63e35eaf9173489c/68747470733a2f2f706f7365722e707567782e6f72672f78702d666f7267652f7064662d7061727365722f76657273696f6e2e737667)](https://packagist.org/packages/xp-forge/pdf-parser)

Parses PDF files to extract text and images.

Example
-------

[](#example)

Low-level usage:

```
use com\adobe\pdf\PdfReader;
use util\cmd\Console;
use io\streams\FileInputStream;

$reader= new PdfReader(new FileInputStream($argv[1]));

// Create objects lookup table while streaming
$objects= $trailer= [];
foreach ($reader->objects() as $kind => $value) {
  if ('object' === $kind) {
    $objects[$value['id']->hashCode()]= $value['dict'];
  } else if ('trailer' === $kind) {
    $trailer+= $value;
  }
}

Console::writeLine('Trailer: ', $trailer);

// Optional meta information like author and creation date
if ($info= ($trailer['Info'] ?? null)) {
  Console::writeLine('Info: ', $objects[$info->hashCode()]);
}

// Root catalogue and pages enumeration
Console::writeLine('Root: ', $objects[$trailer['Root']->hashCode()]);
Console::writeLine('Pages: ', $objects[$trailer['Pages']->hashCode()]);
```

See also
--------

[](#see-also)

-
-
-

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance89

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity23

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

Unknown

Total

1

Last Release

55d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/07d18d882c8b4aaf3466432f64018214f2771eda333202175431ee7233795376?d=identicon)[thekid](/maintainers/thekid)

---

Top Contributors

[![thekid](https://avatars.githubusercontent.com/u/696742?v=4)](https://github.com/thekid "thekid (12 commits)")

---

Tags

modulexp

### Embed Badge

![Health badge](/badges/xp-forge-pdf-parser/health.svg)

```
[![Health](https://phpackages.com/badges/xp-forge-pdf-parser/health.svg)](https://phpackages.com/packages/xp-forge-pdf-parser)
```

###  Alternatives

[xp-framework/compiler

XP Compiler

1826.8k10](/packages/xp-framework-compiler)

PHPackages © 2026

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