PHPackages                             alberon/htmltopdf - 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. alberon/htmltopdf

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

alberon/htmltopdf
=================

HTML to PDF PHP wrapper with executable files

1.0.1(10y ago)2791MITPHPPHP &gt;=5.3.3

Since Sep 8Pushed 10y ago7 watchersCompare

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

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

PHP wrapper for wkhtmltopdf
===========================

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

PHP wrapper for wkhtmltopdf

Install
-------

[](#install)

1. Install Composer:

    ```
    curl -s https://getcomposer.org/installer | php
    ```
2. Add to your `composer.json` file:

    ```
    composer require alberon/htmltopdf
    ```
3. Usage Instructions:

    ```
    // Require the PDF class at the top of the file
    require ABSPATH . '/../vendor/autoload.php';
    use Alberon\htmltopdf\PDF;

    // Open up an ob buffer to capture all the following html
    ob_start();
    // HTML CODE
    // Close the ob buffer and get the html into a variable
    $html = ob_get_clean();

    // Setup the PDF class with the generated html
    $pdf = new PDF($html);

    // Set wkhtmltopdf version
    $pdf->setVersion('amd64');

    // Set whether to include detailed errors or a generic error
    // $pdf->showErrors();
    $pdf->hideErrors();

    // Output the PDF
    $pdf->outputAsPDF('my_filename');
    ```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% 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

3

Last Release

3905d ago

### Community

Maintainers

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

---

Top Contributors

[![d13r](https://avatars.githubusercontent.com/u/236616?v=4)](https://github.com/d13r "d13r (2 commits)")[![lopeax](https://avatars.githubusercontent.com/u/26488873?v=4)](https://github.com/lopeax "lopeax (1 commits)")

---

Tags

pdfwkhtmltopdfbinaryhtmltopdf

### Embed Badge

![Health badge](/badges/alberon-htmltopdf/health.svg)

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

###  Alternatives

[h4cc/wkhtmltopdf-amd64

Convert html to pdf using webkit (qtwebkit). Static linked linux binary for amd64 systems.

48724.6M38](/packages/h4cc-wkhtmltopdf-amd64)[wemersonjanuario/wkhtmltopdf-windows

Convert html to pdf using webkit (qtwebkit). Static linked windows binary for 32 bit and 64 bit systems.

461.1M4](/packages/wemersonjanuario-wkhtmltopdf-windows)[h4cc/wkhtmltopdf-i386

Convert html to pdf using webkit (qtwebkit). Static linked linux binary for i386 systems.

601.9M17](/packages/h4cc-wkhtmltopdf-i386)[silvertipsoftware/wkhtmltopdf-amd64

Convert html to pdf using webkit (qtwebkit). Static linked linux binary for amd64 systems.

10312.2k1](/packages/silvertipsoftware-wkhtmltopdf-amd64)

PHPackages © 2026

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