# mikehaertl/php-pdftk

A PDF conversion and form utility based on pdftk

Repository: https://github.com/mikehaertl/php-pdftk
Canonical: https://ross.abutalabs.com/products/php-pdftk
Language: PHP
License: MIT
License Family: permissive
Last push: 2026-07-21T09:41:45+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 93, release rhythm 93, longevity 100
- inputs: {"age_days": 4438, "days_push": 43, "days_rel": 49, "gap_med": 24.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1015, forks 135 (observed 2026-08-28T04:03:14.257952+00:00)

## What it is
A PHP library wrapping the pdftk command-line tool to fill PDF forms, merge/split PDFs, and manage passwords and metadata. It converts between PHP arrays and XFDF/FDF form data with UTF-8 support.

## Use cases
- fill pdf forms from php
- merge multiple pdf files into one
- split a pdf into single pages
- create fdf or xfdf files from php arrays
- set or remove pdf passwords and permissions
- read pdf form field metadata
- add background or overlay to a pdf

## When to choose
- you need to programmatically fill or flatten PDF forms in PHP
- you want to concatenate, split, or stamp PDFs from a web app
- you need UTF-8-safe XFDF/FDF generation
- you already have pdftk installed on the server

## When to avoid
- you cannot install the pdftk binary on your system
- you need pure-PHP PDF generation without external binaries
- you are stuck with pdftk 1.x and need 2.x-only features
- you run pdftk from snap on Ubuntu and cannot change the temp directory

## Facets
- artifact type: library
- maturity: active
- function: pdf, file-system, security
- domain: pdf, files, web-development
- platform: php, windows, cli
- tags: pdftk-wrapper, pdf-forms, fdf, xfdf, pdf-manipulation, composer-package, linux, macos

## Member repositories
- mikehaertl/php-pdftk (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:14.257952+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:27.244854+00:00, confidence not recorded.
  - readme: https://github.com/mikehaertl/php-pdftk (fetched 2026-08-28T04:03:14.257952+00:00, sha 26bb2f104a95)
- Data as of 2026-08-30T08:39:29.467469+00:00.
