New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

clippings/phantom-pdf

A Package for generating PDF files using PhantomJS
87,565 4
Install
composer require clippings/phantom-pdf
Latest Version:0.12.0
PHP:^7.1
License:MIT
Last Updated:Feb 11, 2020
Links: GitHub  ·  Packagist
Maintainer: hkdobrev

Phantom PDF

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version

Installation

Install via composer

$ composer global require clippings/phantom-pdf

Usage

$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');

Use setBinaryPath('path') to use another version of PhantomJS.

Customizing the conversion script

If you want to use another script to execute with PhantomJS, this it how you do it.

$pdf->useScript('path/to/script');

return $pdf->saveFromView('view');

Credits

Forked from the great https://github.com/danielboendergaard/phantom-pdf package

Copyright (c) 2015, Clippings Ltd. Refactored by Ivan Kerin as part of clippings.com

Related Packages

danielboendergaard/phantom-pdf

A Package for generating PDF files using PhantomJS

495,724 72
antking/phantom-pdf

A Package for generating PDF files using PhantomJS, which fork from danielboende...

1,997 0
eve/pdf-converter

Laravel package to convert HTML to PDF, supporting multiple drivers.

4,065 11
spatie/laravel-html

A fluent html builder

9,216,946 827
mc0de/laravel-html

A fluent html builder

2 0

Version History

Version Released PHP License
0.12.0 ^7.1 MIT
0.11.1 ^7.0 MIT
0.11.0 ^7.0 MIT
0.10.1 >=5.4.0 MIT
0.10.0 >=5.4.0 MIT