2017 © Pedro Peláez
 

library pdf-output

image

rtablada/pdf-output

  • Friday, May 2, 2014
  • by rtablada
  • Repository
  • 2 Watchers
  • 2 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel PhantomJS PDF Generator

Generating PDFs is terrible business. Plus, why learn a new library when you already know HTML and CSS?, (*1)

This package gives you the freedom to build downloadable PDF responses from the skills you already know., (*2)

Installation

To use this package you will need to have both PhantomJS and the phantom npm module installed in your project. To accomplish this, in the root of your project run npm install phantomjs and npm install phantom., (*3)

Then in your composer.json file add "rtablada/pdf-output": "dev-master" to your require block., (*4)

Laravel Installation

To further install this in Laravel, add 'Rtablada\PdfOutput\PDFOutputterServerProvider', to your providers list. This will register the binding pdf-output.response-outputter in the IoC container. Optionally, you can add 'PDF' => 'Rtablada\PdfOutput\PDFFacade', to your facades., (*5)

To build a PDF Downloadable response from a View, simply run PDF::buildPDFDownloadFromView('viewName', $data). This will accept the same arguments as when using View::make., (*6)

If you feel that facades aren't your bag, then feel free to use this without facades like this:, (*7)

$outputter = app('pdf-output.response-outputter');
return $outputter->buildPDFDownloadFromView('viewName', $data)

The Versions