PHPackages                             apilayer/pdfinfo - 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. apilayer/pdfinfo

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

apilayer/pdfinfo
================

pdfinfo PHP wrapper

1.2(6y ago)1131MITPHP

Since Mar 20Pushed 6y agoCompare

[ Source](https://github.com/apilayer/pdfinfo)[ Packagist](https://packagist.org/packages/apilayer/pdfinfo)[ RSS](/packages/apilayer-pdfinfo/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (9)Used By (0)

Simple PHP wrapper to the pdfinfo unix tool.

Inspired by

What is pdfinfo
===============

[](#what-is-pdfinfo)

pdfinfo is an unix tool helping extract information from pdf files.

[http://linuxcommand.org/man\_pages/pdfinfo1.html](http://linuxcommand.org/man_pages/pdfinfo1.html)

You can get metadata, page count and rotation for every page, etc.

Installation
============

[](#installation)

1. Install pdfinfo
------------------

[](#1-install-pdfinfo)

First you need to have pdfinfo in your system.

For ubuntu, there's an easy way for doing this:

```
sudo apt-get install poppler-utils

```

2. Install the library
----------------------

[](#2-install-the-library)

You can just download the file to your project, or install it via composer:

```
composer require apilayer/pdfinfo

```

Usage
=====

[](#usage)

Just pass the path to the pdf file to the constructor, and you can get metadata from its properties immediately:

```
$pdf = new PDFInfo('path/to/the/pdf');
echo $pdf->title; // Get the title
echo $pdf->pages; // Get the number of pages
```

Exceptions
==========

[](#exceptions)

This library throws 4 kind of exceptions to represent the official exit codes.

- OpenPDFException
- OpenOutputException
- PDFPermissionException
- OtherException

Check the [official documentation](https://www.xpdfreader.com/pdfinfo-man.html) for more information.

Reference
=========

[](#reference)

Currently this library supports the following metadata:

- title
- author
- creator
- producer
- creationDate
- modDate
- tagged
- form
- pages
- encrypted
- pageSize
- pageSizes
- fileSize
- optimized
- PDFVersion
- pageRot
- pageRots

Environment variables configuration:

- `PDFINFO_BIN` - location of PDFInfo executable
- `PDFINFO_PAGE_LIMIT` - last page to process, defaults to 999

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 76.3% 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 ~218 days

Recently: every ~381 days

Total

8

Last Release

2545d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bd38700e61a599068017cad8e474d83ecbf30153e6ed3c736a9280d24f546ff?d=identicon)[skauk](/maintainers/skauk)

---

Top Contributors

[![howtomakeaturn](https://avatars.githubusercontent.com/u/1255050?v=4)](https://github.com/howtomakeaturn "howtomakeaturn (29 commits)")[![vluzrmos](https://avatars.githubusercontent.com/u/450848?v=4)](https://github.com/vluzrmos "vluzrmos (3 commits)")[![julian-zehetmayr](https://avatars.githubusercontent.com/u/28352092?v=4)](https://github.com/julian-zehetmayr "julian-zehetmayr (2 commits)")[![mhor](https://avatars.githubusercontent.com/u/4103719?v=4)](https://github.com/mhor "mhor (2 commits)")[![Nenillo](https://avatars.githubusercontent.com/u/355259?v=4)](https://github.com/Nenillo "Nenillo (1 commits)")[![SidRoberts](https://avatars.githubusercontent.com/u/1364214?v=4)](https://github.com/SidRoberts "SidRoberts (1 commits)")

---

Tags

pdfpdfinfo

### Embed Badge

![Health badge](/badges/apilayer-pdfinfo/health.svg)

```
[![Health](https://phpackages.com/badges/apilayer-pdfinfo/health.svg)](https://phpackages.com/packages/apilayer-pdfinfo)
```

###  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)
