2017 © Pedro Peláez
 

library phpwkhtmltopdflaravel

Wrapper for the phpwkhtmltopdf package

image

basdegroot/phpwkhtmltopdflaravel

Wrapper for the phpwkhtmltopdf package

  • Wednesday, November 15, 2017
  • by basdegroot
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

PHP WkHtmlToPdf Laravel Wrapper

This wrapper will include the mikehaertl/phpwkhtmltopdf library. It will use the config functions of laravel and it can be configured threw the .env file. All the functions of the library of mikehaertl are available. https://github.com/mikehaertl/phpwkhtmltopdf, (*1)

Installation

Install the package through composer:, (*2)

composer require basdegroot/phpwkhtmltopdflaravel

Configuration

The application can be configured threw the .env file or by publishing the configuration files to your project., (*3)

Publish

php artisan vendor:publish

.env variables

WKHTMLTOPDF_BINARY = Path to the binary of the WkHtmlToPdf library. Default is 'wkhmltopdf'
WKHTMLTOPDF_INGORE_WARNINGS = Whether to ignore any errors if a PDF file was still created. Default is false
WKHTMLTOPDF_TMP_DIR = Path to tmp directory. Defaults to the PHP temp dir.

Response

The class has an method which returns a Laravel response object with the PDF content + correct headers, (*4)

use Basdegroot\PhpwkhtmltopdfLaravel\Pdf;

$pdf = new Pdf('http://www.google.nl');
return $pdf->response();

// or with a filename

return $pdf->response('filename'); 


The Pdf object extends \mikehaertl\wkhtmlto\Pdf so all the other methods are still available., (*5)

Changelog

Please see CHANGELOG for more information what has changed recently., (*6)

The Versions

15/11 2017

dev-master

9999999-dev

Wrapper for the phpwkhtmltopdf package

  Sources   Download

MIT

The Requires

 

by Bas de Groot

15/11 2017

v1.0.1

1.0.1.0

Wrapper for the phpwkhtmltopdf package

  Sources   Download

MIT

The Requires

 

by Bas de Groot

15/11 2017

v1.0.0

1.0.0.0

Wrapper for the phpwkhtmltopdf package

  Sources   Download

MIT

The Requires

 

by Bas de Groot