PHPackages                             wemersonjanuario/pdf - 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. wemersonjanuario/pdf

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

wemersonjanuario/pdf
====================

HTML to PDF Converter based on wkhtmltopdf

1.1.1(9y ago)519.0k↓34.9%11MITPHPPHP &gt;=5.3.0

Since Apr 28Pushed 8y ago2 watchersCompare

[ Source](https://github.com/wemersonjanuario/pdf)[ Packagist](https://packagist.org/packages/wemersonjanuario/pdf)[ RSS](/packages/wemersonjanuario-pdf/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (3)Versions (4)Used By (1)

HTML to PDF Converter based on wkhtmltopdf for PHP
==================================================

[](#html-to-pdf-converter-based-on-wkhtmltopdf-for-php)

This is a yet another html to pdf converter for php. This package uses [wkhtmltopdf](https://github.com/antialize/wkhtmltopdf) as a third-party tool so `proc_*()` functions have to be enabled in your php configurations and `wkhtmltopdf` tool should be installed in your machine (You can download it from [here](http://wkhtmltopdf.org/)).

Check out the [Laravel version](https://github.com/wemersonjanuario/laravelpdf) if you're using Laravel Framework.

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

[](#installation)

To install this package, run this command:

```
composer require wemersonjanuario/pdf
```

Some examples
-------------

[](#some-examples)

```
$pdf = new Novanti\PDF\PDF('/usr/bin/wkhtmltopdf');

echo $pdf->loadHTML('Hello World')->get();

echo $pdf->loadURL('http://www.laravel.com')->grayscale()->pageSize('A3')->orientation('Landscape')->get();

echo $pdf->loadHTMLFile('/home/can/index.html')->lowquality()->pageSize('A2')->get();

```

\## Saving the output

php-pdf uses [League\\Flysystem](https://github.com/thephpleague/flysystem) to save the file to the local or remote filesystems.

### Usage

[](#usage)

```
$pdfObject->save(string $filename, League\Flysystem\AdapterInterface $adapter, $overwrite)

```

`filename`: the name of the file you want to save with

`adapter`: FlySystem Adapter

`overwrite`: If set to `true` and the file exists it will be overwritten, otherwise an Exception will be thrown.

### Examples

[](#examples)

```
// Save the pdf to the local file system
$pdf->loadHTML('Hello World')
    ->save("invoice.pdf", new League\Flysystem\Adapter\Local(__DIR__.'/path/to/root'));

// Save to AWS S3
$client = S3Client::factory([
    'key'    => '[your key]',
    'secret' => '[your secret]',
]);
$pdf->loadHTML('Hello World')
    ->save("invoice.pdf", new League\Flysystem\Adapter\AwsS3($client, 'bucket-name', 'optional-prefix'));

// Save to FTP
$ftpConf = [
    'host' => 'ftp.example.com',
    'username' => 'username',
    'password' => 'password',

    /** optional config settings */
    'port' => 21,
    'root' => '/path/to/root',
    'passive' => true,
    'ssl' => true,
    'timeout' => 30,
];
$pdf->loadHTML('Hello World')
    ->save("invoice.pdf", new League\Flysystem\Adapter\Ftp($ftpConf));

// Save to the multiple locations and echo to the screen
echo $pdf->loadHTML('Hello World')
        ->save("invoice.pdf", new League\Flysystem\Adapter\Ftp($ftpConf))
        ->save("invoice.pdf", new League\Flysystem\Adapter\AwsS3($client, 'bucket-name', 'optional-prefix'))
        ->save("invoice.pdf", new League\Flysystem\Adapter\Local(__DIR__.'/path/to/root'))
        ->get();

```

Please see all the available adapters on the [League\\Flysystem](https://github.com/thephpleague/flysystem)'s documentation

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

[](#documentation)

You can see all the available methods in the full [documentation](https://github.com/wemersonjanuario/pdf/blob/master/DOCUMENTATION.md) file

Contribution
------------

[](#contribution)

Feel free to contribute!

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~351 days

Total

3

Last Release

3383d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3c2d99e55b50dfe517fd76cfb877c573441ac6895fef90defebad01b6b04041e?d=identicon)[wemersonjanuario](/maintainers/wemersonjanuario)

---

Top Contributors

[![wemersonjanuario](https://avatars.githubusercontent.com/u/38724?v=4)](https://github.com/wemersonjanuario "wemersonjanuario (9 commits)")[![dpovshed](https://avatars.githubusercontent.com/u/786020?v=4)](https://github.com/dpovshed "dpovshed (1 commits)")[![fkranenburg](https://avatars.githubusercontent.com/u/5680394?v=4)](https://github.com/fkranenburg "fkranenburg (1 commits)")[![janhohner](https://avatars.githubusercontent.com/u/649895?v=4)](https://github.com/janhohner "janhohner (1 commits)")

---

Tags

pdfwkhtmltopdfhtml-to-pdfpdf converter

### Embed Badge

![Health badge](/badges/wemersonjanuario-pdf/health.svg)

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

###  Alternatives

[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k26.5M51](/packages/barryvdh-laravel-snappy)[cangelis/pdf

Yet another HTML to PDF Converter based on wkhtmltopdf

5364.4k1](/packages/cangelis-pdf)[rockett/weasyprint

A feature-rich WeasyPrint wrapper for generating PDFs from HTML and CSS, with support for PDF/A, PDF/UA, attachments, and optional Laravel integration.

30224.7k](/packages/rockett-weasyprint)[cangelis/l4pdf

Yet another HTML to PDF Converter for Laravel4

548.6k](/packages/cangelis-l4pdf)[wemersonjanuario/laravelpdf

Another HTML to PDF Converter for Laravel

2913.0k1](/packages/wemersonjanuario-laravelpdf)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.9k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

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