PHPackages                             eprofos/php-wkhtmltopdf - 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. eprofos/php-wkhtmltopdf

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

eprofos/php-wkhtmltopdf
=======================

A PHP library for converting HTML to PDF using wkhtmltopdf with extensive customization options.

v0.2.0(1y ago)116MITPHPPHP &gt;=7.4

Since May 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/eprofos/php-wkhtmltopdf)[ Packagist](https://packagist.org/packages/eprofos/php-wkhtmltopdf)[ RSS](/packages/eprofos-php-wkhtmltopdf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (10)Versions (3)Used By (0)

PHP WKHtmlToPf
==============

[](#php-wkhtmltopf)

[![PHP Version](https://camo.githubusercontent.com/7404ac2849f95f99ace60c4b949c4e57e3188dfc0d5df7a913378138ac571fb6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e342d626c7565)](https://www.php.net/releases/7_4_0.php)[![Stable Version](https://camo.githubusercontent.com/25fa5cb27c8b575b3fe8d0544c10411993d01ea4ea8ba9181559e046b04141d4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6570726f666f732f7068702d776b68746d6c746f706466)](https://packagist.org/packages/eprofos/php-wkhtmltopdf)[![Build Status](https://camo.githubusercontent.com/bff2bce0c49d6a3a18c43fbf1123375973f90002dbcdac08650f6aca35a57a70/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6570726f666f732f7068702d776b68746d6c746f7064662f74657374732e796d6c)](https://github.com/eprofos/php-wkhtmltopdf/actions)[![License](https://camo.githubusercontent.com/23a28e2bd35e4d20b931c1e6af49f53b20c758427c73c2317d29134ef20262dc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6570726f666f732f7068702d776b68746d6c746f706466)](https://github.com/eprofos/php-wkhtmltopdf/blob/main/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/f5312b6d3c6133fefed21600710318c74863bc4ed726646a0130bacc02acac0a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6570726f666f732f7068702d776b68746d6c746f706466)](https://packagist.org/packages/eprofos/php-wkhtmltopdf)

A PHP library for converting HTML to PDF using the `wkhtmltopdf` command-line tool with extensive customization options.

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

[](#requirements)

- PHP 7.4+
- wkhtmltopdf binary installed on your system

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

[](#installation)

You can install the package via composer:

```
composer require eprofos/php-wkhtmltopdf
```

Caution

This package requires the `wkhtmltopdf` binary to be installed on your system. You can download it from the [official website](https://wkhtmltopdf.org/downloads.html) for your respective operating system.

Usage
-----

[](#usage)

Here's a basic example of how to use the library:

```
use Eprofos\PhpWkhtmltopdf\WKHtmlToPdf;

$wkhtmltopdf = new WKHtmlToPdf('/path/to/wkhtmltopdf');

$wkhtmltopdf->addPage('https://example.com')
             ->setPageSize('A4')
             ->setOrientation('Portrait')
             ->setGrayscale(true)
             ->setZoom(0.75)
             ->generate('output.pdf');
```

Documentation
-------------

[](#documentation)

For detailed documentation on all features and options, please refer to the [documentation](docs/README.md).

License
-------

[](#license)

This library is licensed under the MIT License. See the [LICENSE](https://github.com/eprofos/php-wkhtmltopdf/blob/main/LICENSE) file for more details.

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit pull requests or open issues to help improve this library.

Contact
-------

[](#contact)

If you experience bugs or want to request new features, please visit the [issue tracker](https://github.com/eprofos/php-wkhtmltopdf/issues).

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance40

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

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

Total

2

Last Release

541d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a026cd3fd6025d312886e0388d1ace4a588966b566f142b60ac4600941b530f?d=identicon)[eprofos](/maintainers/eprofos)

---

Top Contributors

[![eprofos](https://avatars.githubusercontent.com/u/127096915?v=4)](https://github.com/eprofos "eprofos (14 commits)")

---

Tags

phppdfwkhtmltopdfhtmlconversion

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/eprofos-php-wkhtmltopdf/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[sulu/sulu

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

1.3k1.3M151](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)

PHPackages © 2026

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