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

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

antking/phantom-pdf
===================

A Package for generating PDF files using PhantomJS, which fork from danielboendergaard/phantom-pdf

v0.6.2(11y ago)12.0k1MITPHPPHP &gt;=5.4.0

Since May 26Pushed 10y ago1 watchersCompare

[ Source](https://github.com/TrungVuAnt/phantom-pdf)[ Packagist](https://packagist.org/packages/antking/phantom-pdf)[ RSS](/packages/antking-phantom-pdf/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (14)Used By (0)

Phantom PDF
===========

[](#phantom-pdf)

A Package for generating PDF files using PhantomJS. The package is framework agnostic, but provides integration with Laravel 4/5.

Notice: This package only works on 64-bit Linux operating systems.

\##Installation Run `composer require antking/phantom-pdf`

\####Laravel 4 Installation (optional)

Add `PhantomPdfServiceProvider` in the `providers` array in `app/config/app.php`

```
'providers' => [
  ...
  'PhantomPdf\Laravel\PhantomPdfServiceProvider'
]

```

\####Laravel 5 Installation (optional)

Add `Laravel5ServiceProvider` in the `providers` array in `config/app.php`

```
'providers' => [
  ...
  'PhantomPdf\Laravel\Laravel5ServiceProvider'
]

```

#### Laravel 4/5 Facade usage (optional)

[](#laravel-45-facade-usage-optional)

Add the facade to the `aliases` array in `app/config/app.php` (optional)

```
'aliases' => [
  ...
  'PDF' => 'PhantomPdf\Laravel\PDFFacade'
]

```

\##Usage with Laravel

```
class SampleController extends Controller {

  public function index()
  {
    $view = View::make('index');

    return PDF::createFromView($view, 'filename.pdf');
  }

  public function save()
  {
      $view = View::make('index');

      PDF::saveFromView($view, 'path/filename.pdf');
  }
}
```

\##Usage outside Laravel

```
$pdf = new PdfGenerator;

// Set a writable path for temporary files
$pdf->setStoragePath('storage/path');

// Saves the PDF as a file
$pdf->saveFromView($html, 'filename.pdf');

// Returns a Symfony\Component\HttpFoundation\BinaryFileResponse
return $pdf->createFromView($html, 'filename.pdf');
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.3% 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 ~34 days

Recently: every ~22 days

Total

12

Last Release

4044d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/39c5659d13d84933235ab701954b51874d319eabbfff6f2b8ecbec9ad8bc461e?d=identicon)[TrungVuAnt](/maintainers/TrungVuAnt)

---

Top Contributors

[![danielboendergaard](https://avatars.githubusercontent.com/u/314877?v=4)](https://github.com/danielboendergaard "danielboendergaard (28 commits)")[![TrungVuDang](https://avatars.githubusercontent.com/u/8068759?v=4)](https://github.com/TrungVuDang "TrungVuDang (3 commits)")

---

Tags

laravelpdfhtml

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[danielboendergaard/phantom-pdf

A Package for generating PDF files using PhantomJS

72478.7k](/packages/danielboendergaard-phantom-pdf)

PHPackages © 2026

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