PHPackages                             fawno/php-wkhtmltox - 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. fawno/php-wkhtmltox

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

fawno/php-wkhtmltox
===================

PHP/FFI class for the C library wkhtmltox

0.1.3(6y ago)5112MITPHPPHP &gt;=7.4.0

Since Feb 19Pushed 6y ago2 watchersCompare

[ Source](https://github.com/fawno/PHP-wkhtmltox)[ Packagist](https://packagist.org/packages/fawno/php-wkhtmltox)[ RSS](/packages/fawno-php-wkhtmltox/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

PHP-wkhtmltox
=============

[](#php-wkhtmltox)

[![GitHub license](https://camo.githubusercontent.com/e09754a441f0b9327c1bda28a5c02328fe164417c167dce4fcc928c7d4f41e01/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6661776e6f2f5048502d776b68746d6c746f78)](https://github.com/fawno/PHP-wkhtmltox/blob/master/LICENSE)[![GitHub release](https://camo.githubusercontent.com/707656cb291d1fedf88890fedf2ce924683c82063ea25e221fd424cd246a69fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6661776e6f2f5048502d776b68746d6c746f78)](https://github.com/fawno/PHP-wkhtmltox/releases)[![Packagist](https://camo.githubusercontent.com/a66eeff93b60f592bff1942561a305402c370f7a88855abb4512c896ca66733b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6661776e6f2f7068702d776b68746d6c746f78)](https://packagist.org/packages/fawno/php-wkhtmltox)[![PHP](https://camo.githubusercontent.com/6aa9fce2fb2ba0a77c4ac6ccf8d2733d946acbc4236297a9633ff950131550dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6661776e6f2f7068702d776b68746d6c746f78)](https://php.net)

PHP/FFI class for wkhtmltox C library Render HTML into PDF and various image formats using the Qt WebKit rendering engine.

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

[](#requirements)

- wkhtmltox C library:
- FFI PHP extension (bunded in PHP &gt;= 7.4.0).

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

[](#installation)

You can install this plugin into your application using [composer](https://getcomposer.org):

```
  composer require fawno/php-wkhtmltox

```

Usage
-----

[](#usage)

```
  require 'vendor/autoload.php';

  use Fawno\PHPwkhtmltox\wkhtmltoimage;

  // Create wkhtmltoimage object (on Windows)
  //$wk = new wkhtmltoimage(__DIR__ . '/bin/wkhtmltox.dll');

  // Create wkhtmltoimage object (on Linux)
  $wk = new wkhtmltoimage('/usr/local/lib/wkhtmltox.so');

  // Set screen Width
  $wk->set_global_setting('screenWidth', '1200');

  // Set url to render
  $wk->set_global_setting('in', 'https://wkhtmltopdf.org/');

  // Set output format to PNG
  $wk->set_global_setting('fmt', 'png');

  // Render url and return image as string
  $data = $wk->convert();

  // Set output filename
  $wk->set_global_setting('out', 'wkhtmltopdf.png');

  // Render url
  $wk->convert();
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

4

Last Release

2278d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f697e53dd9415ba890421aeabac0fae34cf9265e71cd9e5f9b115a4eb6b7e14d?d=identicon)[alphp](/maintainers/alphp)

---

Top Contributors

[![alphp](https://avatars.githubusercontent.com/u/8992091?v=4)](https://github.com/alphp "alphp (9 commits)")

---

Tags

ffiffi-bindingsffi-wrapperphpphp-ffiwkhtmltoimagewkhtmltopdfwkhtmltox

### Embed Badge

![Health badge](/badges/fawno-php-wkhtmltox/health.svg)

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

###  Alternatives

[pentiminax/ux-sweet-alert

SweetAlert2 integration for Symfony

254.4k](/packages/pentiminax-ux-sweet-alert)

PHPackages © 2026

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