PHPackages                             checkitsedo/laravel-fpdf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PDF &amp; Document Generation](/categories/documents)
4. /
5. checkitsedo/laravel-fpdf

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

checkitsedo/laravel-fpdf
========================

FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.

v1.0.7(3y ago)0281MITPHPPHP &gt;=5.4.0

Since Oct 20Pushed 3y agoCompare

[ Source](https://github.com/checkitsedo/laravel-fpdf)[ Packagist](https://packagist.org/packages/checkitsedo/laravel-fpdf)[ RSS](/packages/checkitsedo-laravel-fpdf/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (1)Versions (9)Used By (1)

laravel-fpdf
============

[](#laravel-fpdf)

 [ ![tag](https://camo.githubusercontent.com/b62746d94e8a389e509c1c2207d4601b952656820682fd028c01b6f2d22771f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f636865636b69747365646f2f6c61726176656c2d66706466) ](https://github.com/checkitsedo/laravel-fpdf/tags) [ ![Total Downloads](https://camo.githubusercontent.com/e6ee0c7227adb6b29a3760fe2d46dc29c5981672c6db9b964641afc12eee6008/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636865636b69747365646f2f6c61726176656c2d66706466) ](https://packagist.org/packages/checkitsedo/laravel-fpdf) [ ![Issues](https://camo.githubusercontent.com/13af473ebac0fe34dd3a0880962dc3cea43c33f3a957c5f5dcf49e8bee9e4985/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f636865636b69747365646f2f6c61726176656c2d66706466) ](https://github.com/checkitsedo/laravel-fpdf/issues) [ ![Forks](https://camo.githubusercontent.com/c572b1fdbb4167c3efe3ed4beac3901ef4a33145f6dea7f1eb5120c3bdb31071/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f636865636b69747365646f2f6c61726176656c2d66706466) ](https://github.com/checkitsedo/laravel-fpdf/fork) [ ![Stars](https://camo.githubusercontent.com/3509a464fe88963d62ecbfa5609159623a9be8e0c3333e00efab026dae0978a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f636865636b69747365646f2f6c61726176656c2d66706466) ](https://github.com/checkitsedo/laravel-fpdf/stargazers) [ ![](https://camo.githubusercontent.com/4b5f10ae0dc2103dfaad16f0308131ad4fdecdf1448ebbf7f5b116e5b222433d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f636865636b69747365646f2f6c61726176656c2d66706466) ](https://github.com/checkitsedo/laravel-fpdf/blob/master/LICENSE)

FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs..

Installation Composer
---------------------

[](#installation-composer)

```
  composer require checkitsedo/laravel-fpdf
```

### Laravel &gt;= 5.5

[](#laravel--55)

Enjoy the auto discovery feature.

### Laravel &lt;5.5

[](#laravel-55)

`config/app.php`

```
// config/app.php

return [
    'aliases' => [
        'Fpdf' => Checkitsedo\Fpdf\Facades\FpdfFacade::class,
     ]
```

Basic Tutorial
--------------

[](#basic-tutorial)

### Route Page example

[](#route-page-example)

```
     Route::get('/', function () {
         Fpdf::AddPage();
         Fpdf::SetFont('Courier', 'B', 18);
         Fpdf::Cell(50, 25, 'Hello World!');
         Fpdf::Output();
         exit();
     });
```

### Controller Page example

[](#controller-page-example)

```
namespace App\Http\Controllers;

use Fpdf;

class TestController extends Controller
{
    public function test(){
        Fpdf::AddPage();
        Fpdf::SetFont('Courier', 'B', 18);
        Fpdf::Cell(50, 25, 'Hello World!');
        Fpdf::Output();
        exit;
    }

}

```

### Blade Page example

[](#blade-page-example)

```
namespace App\Http\Controllers;

//use Fpdf;

class TestController extends Controller
{
    public function testView(){
        return view('test');
    }
}
```

Blade Page Path: view/test.blade.php

```
// test.blade.php
