PHPackages                             aryatama045/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. aryatama045/laravel-fpdf

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

aryatama045/laravel-fpdf
========================

Laravel package to include Fpdf. It ships with Fpdf 1.84.

156↓100%PHP

Since Dec 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/aryatama045/laravel-fpdf)[ Packagist](https://packagist.org/packages/aryatama045/laravel-fpdf)[ RSS](/packages/aryatama045-laravel-fpdf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel FPDF
============

[](#laravel-fpdf)

install
-------

[](#install)

**1) Composer**

```
composer require aryatama045/laravel-fpdf
```

**2) Optional:** Laravel 5.4 and below

```
// config/app.php

'providers' => [
  // ...
  Aryatama045\Fpdf\FpdfServiceProvider::class,
],

'aliases' => [
  // ...
  'Fpdf' => Aryatama045\Fpdf\Facades\Fpdf::class,
],

```

Usage
-----

[](#usage)

### (Method 1) Facade

[](#method-1-facade)

```
use App\Http\Controllers\Controller;
use Aryatama045\Fpdf\Facades\Fpdf;

class MyController extends Controller
{
    public function index()
    {
        Fpdf::AddPage();
        Fpdf::SetFont('Courier', 'B', 18);
        Fpdf::Cell(50, 25, 'Hello World!');
        Fpdf::Output('I', "MyPdf.pdf", true);

        exit;
    }
}
```

### (Method 2) Extends class

[](#method-2-extends-class)

create your pdf class

```
namespace App\Pdf;

use Aryatama045\Fpdf\Fpdf;

class MyPdf extends Fpdf
{
    private $data;

    public function __construct($data)
    {
        $this->data = $data;
        parent::__construct('P', 'mm', 'A4');
        $this->SetA4();
        $this->SetTitle('My pdf title', true);
        $this->SetAuthor('Aryatama', true);
        $this->AddPage('L');
        $this->Body();
    }

    public function Header()
    {
        // fixed all pages
    }

    public function Body()
    {
        $this->SetFont('Arial', 'B', '24');
        $this->Cell(50, 25, $this->data->title);

        $this->SetFont('Arial', '', '14');
        $this->Cell(50, 25, $this->data->content);
    }

    public function Footer()
    {
        // fixed all pages
    }
}
```

In your controll

```
use App\Http\Controllers\Controller;
use App\Pdf\MyPdf;

class MyController extends Controller
{
    public function index()
    {
        $data = MyModel::all();

        $myPdf = new MyPdf($data);

        $myPdf->Output('I', "MyPdf.pdf", true);

        exit;
    }
}
```

FPDF official docs
==================

[](#fpdf-official-docs)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 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/48c16a03e21cfcacea9544ffe895948e7d092e39b72956dff703db5dca8bc7c2?d=identicon)[aryatama045](/maintainers/aryatama045)

---

Top Contributors

[![aryatama045](https://avatars.githubusercontent.com/u/18211338?v=4)](https://github.com/aryatama045 "aryatama045 (39 commits)")

### Embed Badge

![Health badge](/badges/aryatama045-laravel-fpdf/health.svg)

```
[![Health](https://phpackages.com/badges/aryatama045-laravel-fpdf/health.svg)](https://phpackages.com/packages/aryatama045-laravel-fpdf)
```

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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