PHPackages                             eddturtle/qpdf-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. eddturtle/qpdf-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eddturtle/qpdf-php
==================

PHP wrapper for the qpdf library

v1.0(2y ago)2106.3k↓15.1%1MITPHPPHP &gt;=7.4

Since Nov 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/eddturtle/qpdf-php)[ Packagist](https://packagist.org/packages/eddturtle/qpdf-php)[ RSS](/packages/eddturtle-qpdf-php/feed)WikiDiscussions master Synced 1mo ago

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

Qpdf PHP
========

[](#qpdf-php)

[![phpunit](https://github.com/eddturtle/qpdf-php/actions/workflows/phpunit.yml/badge.svg)](https://github.com/eddturtle/qpdf-php/actions/workflows/phpunit.yml/badge.svg)[![phpstan](https://github.com/eddturtle/qpdf-php/actions/workflows/phpstan.yml/badge.svg)](https://github.com/eddturtle/qpdf-php/actions/workflows/phpstan.yml/badge.svg)

PHP wrapper for the qpdf library.

Currently requires PHP 7.4+ and the `qpfd` library installed (`sudo apt install qpdf`).

To Install
----------

[](#to-install)

```
composer require eddturtle/qpdf-php

```

Examples:
---------

[](#examples)

### Merge

[](#merge)

```
$qpdf = new \EddTurtle\Qpdf\Pdf();

$qpdf->addPage(__DIR__ . "/files/TestPdf.pdf");
$qpdf->addPage(__DIR__ . "/files/TestPdf2.pdf");

$result = $qpdf->merge(__DIR__ . "/output/test-merge.pdf");

if (!$result || !empty($qpdf->getError())) {
    var_dump($qpdf->getError());
} else {
    var_dump('success');
}
```

### Split a multi page PDF file

[](#split-a-multi-page-pdf-file)

```
$qpdf = new \EddTurtle\Qpdf\Pdf();
$qpdf->addPage(__DIR__ . "/files/TestPdfTwoPage.pdf");
$qpdf->split(__DIR__."/output/test-split.pdf");

if (!$result || !empty($qpdf->getError())) {
    var_dump($qpdf->getError());
} else {
    var_dump('success');
}
// Results in "/output/" containing 'test-split-1.pdf' and 'test-split-2.pdf'
```

### Rotate a PDF file

[](#rotate-a-pdf-file)

```
$qpdf = new \EddTurtle\Qpdf\Pdf();
$pdf->addPage(__DIR__ . "/files/TestPdfTwoPage.pdf");
$result = $pdf->rotate(__DIR__ . "/output/rotated.pdf", "+90", "1");

if (!$result || !empty($qpdf->getError())) {
    var_dump($qpdf->getError());
} else {
    var_dump('success');
}
// Results in "/output/rotated.pdf" having its first page rotated 90&deg; clockwise
```

### Count PDF pages

[](#count-pdf-pages)

```
$qpdf = new \EddTurtle\Qpdf\Pdf();
$pdf->addPage(__DIR__ . "/files/TestPdfTwoPage.pdf");
$pdf->addPage(__DIR__ . "/files/TestPdf.pdf");
$count = $pdf->getPageCount();
// Results in $count containing a value of 3
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

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

Total

3

Last Release

887d ago

Major Versions

v0.2 → v1.02023-12-13

PHP version history (2 changes)v0.1PHP &gt;=7.2

v1.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/902607?v=4)[Edd Turtle](/maintainers/eddturtle)[@eddturtle](https://github.com/eddturtle)

---

Top Contributors

[![eddturtle](https://avatars.githubusercontent.com/u/902607?v=4)](https://github.com/eddturtle "eddturtle (10 commits)")[![levi730](https://avatars.githubusercontent.com/u/154903?v=4)](https://github.com/levi730 "levi730 (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eddturtle-qpdf-php/health.svg)

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

###  Alternatives

[ericmann/wp-session-manager

Prototype session management for WordPress.

27123.6k1](/packages/ericmann-wp-session-manager)[irazasyed/docgen

Streamline your Laravel package development with automatic facade documentation using Docgen for Laravel

233.8k10](/packages/irazasyed-docgen)

PHPackages © 2026

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