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(1y 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 today

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

33

—

LowBetter than 75% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

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

698d 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://www.gravatar.com/avatar/36e5a70419b45d8c6e57b00e9320911100daeed76818ecbc11eaf35e21115487?d=identicon)[gmi](/maintainers/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

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[easybook/easybook

Book publishing application

76011.5k](/packages/easybook-easybook)[drutiny/drutiny

This is a generic Drupal 7 and Drupal 8 site auditing and optional remediation tool.

132122.2k17](/packages/drutiny-drutiny)[ismaelw/laratex

A package for creating PDFs in Laravel using LaTeX

12730.1k](/packages/ismaelw-laratex)[rockett/weasyprint

A feature-rich Laravel wrapper for the WeasyPrint Document Factory.

28199.7k](/packages/rockett-weasyprint)[bobv/latex-bundle

Latex and pdf generator for Symfony 2

2432.7k](/packages/bobv-latex-bundle)

PHPackages © 2026

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