PHPackages                             peal/larapdf - 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. peal/larapdf

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

peal/larapdf
============

PDF document package using laravel

13PHP

Since Aug 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/moin786/LaravelFpdf)[ Packagist](https://packagist.org/packages/peal/larapdf)[ RSS](/packages/peal-larapdf/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Package for FPDF
========================

[](#laravel-package-for-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. FPDF has other advantages: high level functions.

Installation
------------

[](#installation)

Inside your project root directory, open your terminal

```
composer require peal/larapdf
```

Composer will automatically download all dependencies.

#### For Laravel

[](#for-laravel)

After complete the installation, open your app.php from config folder, paste below line inside providers array

```
peal\larapdf\PdfServiceProvider::class,
```

For Facade support, paste below line inside aliases array

```
'Pdf' => peal\larapdf\Facades\Pdf::class,
```

Then run this command

```
php artisan vendor:publish --provider="peal\larapdf\PdfServiceProvider"
```

After vendor published check your config folder pdf-config.php is created.

```
/*
 * FPDF class
 *
 */

return [
    'pdfservice'  => peal\larapdf\FPDF::class,
];
```

### Basic settings

[](#basic-settings)

```
$pdf = App::make('pdf');
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
```

You can chain it

```
$pdf = App::make('pdf');
$pdf->AddPage()
    ->SetFont('Arial','B',16)
    ->Cell(40,10,'Hello World!')
    ->Output();
```

### OR

[](#or)

```
use peal\larapdf\Facades\Pdf;
Pdf::AddPage()
    ->SetFont('Arial','B',16)
    ->Cell(40,10,'Hello World!')
    ->Output();
```

### Advances Usages without Facades

[](#advances-usages-without-facades)

Inside your Controller method

```
        $row_height = 6;

        $y_axis = 50;
        $y_axis = $y_axis + $row_height;

        $pdf = App::make('pdf');
        $pdf->AddPage()
        ->SetFont('Arial','B',16)
        ->Cell(0,10,"SAIC Institute of Management & Technology",0,0,'C')
        ->SetFont('Arial','B',12)
        ->Cell(-65, 30, 'Begum Rokeya Avenue, Dhaka',0,'C',0)
        ->Cell(-11, 50, 'Phone: 01936-005816',0,'C',0)
        ->SetFillColor(232, 232, 232)
                ->SetY(50)
                ->SetX(25)
                ->SetFont('Arial', 'B', 10)
                ->Cell(20, 6, 'Room No', 1, 0, 'L', 1)
                ->Cell(20, 6, 'Seat No', 1, 0, 'L', 1)
                ->Cell(30, 6, 'Student ID', 1, 0, 'L', 1)
                ->Cell(60, 6, 'Student Name', 1, 0, 'L', 1)
                ->Cell(20, 6, 'Seat Rent', 1, 0, 'L', 1)
                ->Cell(25, 6, 'Meal Charge', 1, 0, 'L', 1)
                ->SetY($y_axis)
                ->SetX(25)
                ->SetFont('Arial', '', 10)
                ->Cell(20, 6, 200, 1, 0, 'L', 1)
                ->Cell(20, 6, 201, 1, 0, 'L', 1)
                ->Cell(30, 6, 'CMT2018002', 1, 0, 'L', 1)
                ->Cell(60, 6, "Saiful Islam", 1, 0, 'L', 1)
                ->Cell(20, 6, 2000, 1, 0, 'L', 1)
                ->Cell(25, 6, 50, 1, 0, 'L', 1)

                ->Output();
```

### Advance usages using Facades

[](#advance-usages-using-facades)

Inside your Controller method

```
   use peal\larapdf\Facades\Pdf;
        $row_height = 6;

        $y_axis = 50;
        $y_axis = $y_axis + $row_height;

        Pdf::AddPage()
        ->SetFont('Arial','B',16)
        ->Cell(0,10,"SAIC Institute of Management & Technology",0,0,'C')
        ->SetFont('Arial','B',12)
        ->Cell(-65, 30, 'Begum Rokeya Avenue, Dhaka',0,'C',0)
        ->Cell(-11, 50, 'Phone: 01936-005816',0,'C',0)
        ->SetFillColor(232, 232, 232)
                ->SetY(50)
                ->SetX(25)
                ->SetFont('Arial', 'B', 10)
                ->Cell(20, 6, 'Room No', 1, 0, 'L', 1)
                ->Cell(20, 6, 'Seat No', 1, 0, 'L', 1)
                ->Cell(30, 6, 'Student ID', 1, 0, 'L', 1)
                ->Cell(60, 6, 'Student Name', 1, 0, 'L', 1)
                ->Cell(20, 6, 'Seat Rent', 1, 0, 'L', 1)
                ->Cell(25, 6, 'Meal Charge', 1, 0, 'L', 1)
                ->SetY($y_axis)
                ->SetX(25)
                ->SetFont('Arial', '', 10)
                ->Cell(20, 6, 200, 1, 0, 'L', 1)
                ->Cell(20, 6, 201, 1, 0, 'L', 1)
                ->Cell(30, 6, 'CMT2018002', 1, 0, 'L', 1)
                ->Cell(60, 6, "Saiful Islam", 1, 0, 'L', 1)
                ->Cell(20, 6, 2000, 1, 0, 'L', 1)
                ->Cell(25, 6, 50, 1, 0, 'L', 1)

                ->Output();
```

### For core php

[](#for-core-php)

```
use peal\larapdf\Mediator\Pdf;
use peal\larapdf\FPDF;

$pdf = new Pdf(new FPDF());
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'Hello World!');
$pdf->Output();
```

### More tutorial from

[](#more-tutorial-from)

[FPDF](http://www.fpdf.org/)

### Author

[](#author)

[Mohammed Minuddin(Peal)](https://moinshareidea.wordpress.com)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/171ff00d2636607267851b5600ddb93bdeb77b62dca6f1b6c031dd6f40a3753d?d=identicon)[moin786](/maintainers/moin786)

---

Top Contributors

[![moin786](https://avatars.githubusercontent.com/u/12525167?v=4)](https://github.com/moin786 "moin786 (16 commits)")

### Embed Badge

![Health badge](/badges/peal-larapdf/health.svg)

```
[![Health](https://phpackages.com/badges/peal-larapdf/health.svg)](https://phpackages.com/packages/peal-larapdf)
```

###  Alternatives

[qipsius/tcpdf-bundle

A bundle to easily integrate TCPDF into Symfony

23749.5k](/packages/qipsius-tcpdf-bundle)[macopedia/magmi2

Magento Mass Importer 'Magmi' for Magento 2

11615.7k](/packages/macopedia-magmi2)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.4k](/packages/tarfin-labs-easy-pdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
