PHPackages                             gmi/toolkit-pdftk - 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. gmi/toolkit-pdftk

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

gmi/toolkit-pdftk
=================

PDFtk wrapper

3.0.0(2y ago)3142LGPL-3.0-onlyPHPPHP &gt;=7.1.0CI failing

Since Dec 5Pushed 1y ago4 watchersCompare

[ Source](https://github.com/gmitirol/toolkit-pdftk)[ Packagist](https://packagist.org/packages/gmi/toolkit-pdftk)[ Docs](https://github.com/gmitirol/toolkit-pdftk)[ RSS](/packages/gmi-toolkit-pdftk/feed)WikiDiscussions main Synced 2w ago

READMEChangelogDependencies (5)Versions (15)Used By (0)

PHP Toolkit - PDFtk
===================

[](#php-toolkit---pdftk)

This library provides an object-oriented, simple interface for the most important PDFtk features.

The current build status and code analysis can be found here:

- [Scrutinizer CI](https://scrutinizer-ci.com/g/gmitirol/toolkit-pdftk/)

Requirements
------------

[](#requirements)

- PHP 7.1.0 or higher
- mbstring extension
- pdftk

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

[](#installation)

The recommended way to install toolkit-pdftk is via composer.

```
"require": {
    "gmi/toolkit-pdftk": "3.0.*"
}
```

Usage examples
--------------

[](#usage-examples)

```
use Gmi\Toolkit\Pdftk\Bookmark;
use Gmi\Toolkit\Pdftk\Pdftk;

$source = '/path/to/source.pdf';
$target = '/path/to/target.pdf';

$pdftk = new Pdftk();
// import a source PDF (metadata, page information, bookmarks)
$pdftk->import($source);

// create an additional bookmark
$exampleBookmark = new Bookmark();
$exampleBookmark
    ->setPageNumber(1)
    ->setLevel(2)
    ->setTitle('Section 3')
;

// add the bookmark to the PDF
$pdftk->bookmarks()->add($exampleBookmark);
// set metadata entry for the PDF
$pdftk->metadata()->set('Author', 'Jane Doe');

// apply bookmarks and metadata to the source PDF using a specified target PDF
$pdftk->apply($source, $target);
```

Tests
-----

[](#tests)

The test suite can be run with `vendor/bin/phpunit tests`.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~192 days

Total

13

Last Release

748d ago

Major Versions

1.2.1 → 2.0.02019-01-30

2.2.1 → 3.0.02024-06-11

PHP version history (2 changes)1.0.0PHP &gt;=5.6.0

3.0.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6316e9c35db774eda1f74aa8629e0cda915df7eec254f7b90929ae5049ca1fa0?d=identicon)[andaris](/maintainers/andaris)

![](https://avatars.githubusercontent.com/u/157578374?v=4)[gmi](/maintainers/gmi)[@gmi](https://github.com/gmi)

---

Top Contributors

[![xelan](https://avatars.githubusercontent.com/u/5080535?v=4)](https://github.com/xelan "xelan (41 commits)")

---

Tags

pdfpdf-manipulationpdftkphpphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gmi-toolkit-pdftk/health.svg)

```
[![Health](https://phpackages.com/badges/gmi-toolkit-pdftk/health.svg)](https://phpackages.com/packages/gmi-toolkit-pdftk)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[drupal/core-recommended

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

6941.5M396](/packages/drupal-core-recommended)[civicrm/civicrm-core

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

751284.3k37](/packages/civicrm-civicrm-core)

PHPackages © 2026

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