# mikehaertl/phpwkhtmltopdf

A slim PHP wrapper around wkhtmltopdf with an easy to use and clean OOP interface

Repository: https://github.com/mikehaertl/phpwkhtmltopdf
Canonical: https://ross.abutalabs.com/products/phpwkhtmltopdf
Language: PHP
License: MIT
License Family: permissive
Last push: 2026-02-21T07:01:18+00:00

## Health v2 (maintenance only)
Score: 53/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 68, release rhythm 8, longevity 100
- inputs: {"age_days": 5243, "days_push": 193, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1608, forks 233 (observed 2026-08-28T04:05:10.721535+00:00)

## What it is
A slim PHP wrapper around the wkhtmltopdf (and optionally wkhtmltoimage) command-line tools, exposing a clean OOP interface for creating PDFs and images from HTML files, strings, or URLs. It supports multi-page documents, cover pages, and tables of contents, and can save, send, or return the generated output.

## Use cases
- generate pdf from html in php
- convert html string to pdf
- render a url as a pdf report
- create multi-page pdf with cover and table of contents
- convert html to image with wkhtmltoimage
- stream generated pdf to browser for download

## When to choose
- you are a PHP developer needing HTML-to-PDF conversion
- you already have wkhtmltopdf installed and want a clean OOP API around it
- you need multi-page PDFs with covers and TOCs
- you want to save, send, or stringify PDF output easily

## When to avoid
- you cannot install the wkhtmltopdf binary on your system
- you need pure-PHP PDF generation without external binaries
- you need a maintained renderer for modern CSS/JS, since wkhtmltopdf is no longer actively developed
- you are not working in PHP

## Facets
- artifact type: library
- maturity: stable
- function: pdf, image-processing, cli
- domain: pdf, web-development, developer-tools
- platform: php, cross-platform, cli
- tags: wkhtmltopdf, html-to-pdf, pdf-generation, wrapper, oop-interface

## Member repositories
- mikehaertl/phpwkhtmltopdf (main) score 53

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:10.721535+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-30T03:51:34.816643+00:00, confidence not recorded.
  - readme: https://github.com/mikehaertl/phpwkhtmltopdf (fetched 2026-08-28T04:05:10.721535+00:00, sha 7a47dbb4df91)
- Data as of 2026-08-30T08:39:29.467469+00:00.
