PHPackages                             basdegroot/phpwkhtmltopdflaravel - 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. basdegroot/phpwkhtmltopdflaravel

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

basdegroot/phpwkhtmltopdflaravel
================================

Wrapper for the phpwkhtmltopdf package

v1.0.1(8y ago)27.4k↓50%1MITPHP

Since Nov 15Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (3)Used By (0)

PHP WkHtmlToPdf Laravel Wrapper
===============================

[](#php-wkhtmltopdf-laravel-wrapper)

This wrapper will include the [mikehaertl/phpwkhtmltopdf](https://github.com/mikehaertl/phpwkhtmltopdf) library. It will use the config functions of laravel and it can be configured threw the .env file. All the functions of the library of mikehaertl are available.

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

[](#installation)

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

```
composer require basdegroot/phpwkhtmltopdflaravel

```

Configuration
-------------

[](#configuration)

The application can be configured threw the .env file or by publishing the configuration files to your project.

### Publish

[](#publish)

```
php artisan vendor:publish

```

### .env variables

[](#env-variables)

```
WKHTMLTOPDF_BINARY = Path to the binary of the WkHtmlToPdf library. Default is 'wkhmltopdf'
WKHTMLTOPDF_INGORE_WARNINGS = Whether to ignore any errors if a PDF file was still created. Default is false
WKHTMLTOPDF_TMP_DIR = Path to tmp directory. Defaults to the PHP temp dir.

```

Response
--------

[](#response)

The class has an method which returns a Laravel response object with the PDF content + correct headers

```
use Basdegroot\PhpwkhtmltopdfLaravel\Pdf;

$pdf = new Pdf('http://www.google.nl');
return $pdf->response();

// or with a filename

return $pdf->response('filename');

```

The Pdf object extends \\mikehaertl\\wkhtmlto\\Pdf so all the other methods are still available.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

2

Last Release

3104d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2210762?v=4)[Bas de Groot](/maintainers/basdegroot)[@basdegroot](https://github.com/basdegroot)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/basdegroot-phpwkhtmltopdflaravel/health.svg)

```
[![Health](https://phpackages.com/badges/basdegroot-phpwkhtmltopdflaravel/health.svg)](https://phpackages.com/packages/basdegroot-phpwkhtmltopdflaravel)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[lucasromanojf/laravel5-pdf

Provides the HTML2PDF functionality using the wkhtmltopdf library (Laravel 5)

1271.8k](/packages/lucasromanojf-laravel5-pdf)

PHPackages © 2026

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