tonystore/fpdf-laravel is a Laravel package for paquete para usar libreria fpdf en laravel.
It currently has 0 GitHub stars and 10 downloads on Packagist (latest version v1.0.0).
Install it with composer require tonystore/fpdf-laravel.
Discover more Laravel packages by tonystore
or browse all Laravel packages to compare alternatives.
Last updated
This package uses FPDF and allows integration with Laravel, and is based on the crabbly/fpdf-laravel package, but with an updated version of FPDF.
Run this command line in console.
composer require tonystore/fpdf-laravel
For your Laravel app, open config/app.php and, within the providers array, append:
Tonystore\Fpdf\FpdfServiceProvider::class
We can resolve the FPDF class instance out of the container:
$pdf = app('Fpdf');
OR
$pdf = new Fpdf();
Create a 'Hello World' PDF document and display it in the browser:
use Illuminate\Support\Facades\Storage;
//create pdf document
$pdf = new Fpdf('P', 'mm', 'A4'); //Attributes assigned to the document.
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output(); // 'I' is the default output.
exit;