PHPackages                             vixriihi/html2pdf - 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. vixriihi/html2pdf

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

vixriihi/html2pdf
=================

php wrapper to wkhtmltopdf

0127PHP

Since Jan 27Pushed 11y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Html to pdf
===========

[](#html-to-pdf)

This is a php wrapper for [wkhtmltopdf](http://wkhtmltopdf.org/).

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

[](#requirements)

- php &gt; 5.4.0
- [wkhtmltopdf](http://wkhtmltopdf.org/downloads.html)

Basic usage
-----------

[](#basic-usage)

```
use Vixriihi\Html2Pdf;

$html = 'Working';

$html2pdf = new Html2Pdf();
$pdf      = $html2pdf->convert($html);

header("Content-type: application/octet-stream");
header("Content-disposition: attachment;filename=hmtl.pdf");

echo $pdf;
```

[All options for wkhtmltopdf](http://wkhtmltopdf.org/usage/wkhtmltopdf.txt) are accessible with method setParameter

```
$html2pdf = new Html2Pdf();
$html2pdf->setParam('page-size','A3');
$html2pdf->setParam('dpi',96);
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fa5ddbbb3ae8cbba7768023f24f5096f07cf9ece6b8b33605d004cb9eedcde1?d=identicon)[vixriihi](/maintainers/vixriihi)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/vixriihi-html2pdf/health.svg)

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

###  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)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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