anouar/fpdf
If you're going to use this package with L4, make sure you include the laravel 4 version:
"require": {
"anouar/fpdf": "1.0.1"
}
##laravel-Fpdf
Fpdf lets you generate PDF files. This package is the laravel package version of http://www.fpdf.org , for more information check this link http://www.fpdf.org/?lang=en
##Donation : If you want to support us:
###Installation
Add the following to your composer.json file:
"require-dev": {
"anouar/fpdf": "1.0.2"
}
Next, run composer install to download it.
Add the service provider to app/config/app.php, within the providers array.
'providers' => array(
// ...
'Anouar\Fpdf\FpdfServiceProvider',
)
Finally, add the alias to app/config/app.php, within the aliases array.
'aliases' => array(
// ...
'Fpdf' => 'Anouar\Fpdf\Facades\Fpdf',
)
##Example Code
Route::get('pdf', function(){
$fpdf = new Fpdf();
$fpdf->AddPage();
$fpdf->SetFont('Arial','B',16);
$fpdf->Cell(40,10,'Hello World!');
$fpdf->Output();
exit;
});
##OR
Route::get('pdf', function(){
Fpdf::AddPage();
Fpdf::SetFont('Arial','B',16);
Fpdf::Cell(40,10,'Hello World!');
Fpdf::Output();
exit;
});
Related Packages
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 2.0 | >=5.3.0 | ~5.0 | BSD-2-Clause | |
| 1.0.2 | >=5.3.0 | ~5.0 | BSD-2-Clause | |
| 1.0.1 | >=5.3.0 | ~4.0 | BSD-2-Clause |