PHPackages                             mikehaertl/phpwkhtmltopdf - 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. mikehaertl/phpwkhtmltopdf

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

mikehaertl/phpwkhtmltopdf
=========================

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

2.5.0(5y ago)1.6k20.0M—3.2%233[3 issues](https://github.com/mikehaertl/phpwkhtmltopdf/issues)20MITPHPPHP &gt;=5.0.0

Since Dec 18Pushed 2mo ago64 watchersCompare

[ Source](https://github.com/mikehaertl/phpwkhtmltopdf)[ Packagist](https://packagist.org/packages/mikehaertl/phpwkhtmltopdf)[ Docs](http://mikehaertl.github.com/phpwkhtmltopdf/)[ RSS](/packages/mikehaertl-phpwkhtmltopdf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (30)Used By (20)

PHP WkHtmlToPdf
===============

[](#php-wkhtmltopdf)

[![GitHub Tests](https://github.com/mikehaertl/phpwkhtmltopdf/workflows/Tests/badge.svg)](https://github.com/mikehaertl/phpwkhtmltopdf/actions)[![Packagist Version](https://camo.githubusercontent.com/4173023800870e61a3699b5c402a8ad5fb34eca3d6b8ca9f68bb997687f140b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d696b6568616572746c2f706870776b68746d6c746f7064663f6c6162656c3d76657273696f6e)](https://packagist.org/packages/mikehaertl/phpwkhtmltopdf)[![Packagist Downloads](https://camo.githubusercontent.com/bbf2603000a1629e056381cb9b9ba6296db9e5ee142fdd8dcaf8ce9d432c217d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d696b6568616572746c2f706870776b68746d6c746f706466)](https://packagist.org/packages/mikehaertl/phpwkhtmltopdf)[![GitHub license](https://camo.githubusercontent.com/3fac87338885d71ed81e1589ca8a909267c21daeef4fcc8d7318d3da2b7c4183/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d696b6568616572746c2f706870776b68746d6c746f706466)](https://github.com/mikehaertl/phpwkhtmltopdf/blob/master/LICENSE)[![Packagist PHP Version Support](https://camo.githubusercontent.com/086c5de95b3581544f580f312a0adc9cccc034c667ecace0f937642e7231b8b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d696b6568616572746c2f706870776b68746d6c746f706466)](https://packagist.org/packages/mikehaertl/phpwkhtmltopdf)

PHP WkHtmlToPdf provides a simple and clean interface to ease PDF and image creation with [wkhtmltopdf](http://wkhtmltopdf.org). **The `wkhtmltopdf` and - optionally - `wkhtmltoimage`command must be installed and working on your system.** See the section below for details.

For Windows systems make sure to set the path to wkhtmltopdf.exe in the binary option. Alternatively you can add the wkhtmltopdf "bin" directory to the system PATH variable to allow wkhtmltopdf command available to Windows CMD.

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

[](#installation)

Install the package through [composer](http://getcomposer.org):

```
composer require mikehaertl/phpwkhtmltopdf

```

Make sure, that you include the composer [autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading)somewhere in your codebase.

Examples
--------

[](#examples)

### Single page PDF

[](#single-page-pdf)

```
