| Package Data | |
|---|---|
| Maintainer Username: | crabbly |
| Maintainer Contact: | rodrigo@crabbly.com (Rodrigo Vieira) |
| Package Create Date: | 2016-08-25 |
| Package Last Update: | 2023-01-28 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-01 15:00:29 |
| Package Statistics | |
|---|---|
| Total Downloads: | 133,579 |
| Monthly Downloads: | 1,912 |
| Daily Downloads: | 38 |
| Total Stars: | 30 |
| Total Watchers: | 1 |
| Total Forks: | 8 |
| Total Open Issues: | 5 |
A package for Laravel to implement the FPDF class.
FPDF Official Website: www.fpdf.org
From the command line, run:
composer require crabbly/fpdf-laravel
For your Laravel app, open config/app.php and, within the providers array, append:
Crabbly\FPDF\FpdfServiceProvider::class
This will bootstrap the package into Laravel.
We can resolve the FPDF class instance out of the container:
$pdf = app('FPDF');
We can also instantiate it directly:
$pdf = new Crabbly\FPDF\FPDF;
For documentation manual and tutorials, please visit www.fpdf.org
Create a 'Hello World' PDF document and save it to a file in the storage folder:
use Illuminate\Support\Facades\Storage;
//create pdf document
$pdf = app('FPDF');
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
//save file
Storage::put($pdf->Output('S'));
Pull requests are welcome. Please report any issue you find in the issues page.
The package is free software distributed under the terms of the MIT license. FPDF is a free PHP class, you may use it for any kind of usage and modify it to suit your needs.