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

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

samuelmwangiw/laravel-fpdf
==========================

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

1.7.2(5y ago)078MITPHPPHP &gt;=7.3|^8.0

Since Jun 21Pushed 3y agoCompare

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

READMEChangelogDependencies (3)Versions (19)Used By (0)

Laravel package for Fpdf
========================

[](#laravel-package-for-fpdf)

[![Latest Stable Version](https://camo.githubusercontent.com/d8d86820a6eb93a0d5ef018e0fb76ad34abe55fe151a58b694b564b264b4b092/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d667064662f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-fpdf)[![Total Downloads](https://camo.githubusercontent.com/dfff9a510c0004e3c0e25ff286b51b5c790c13258981858b9c6571f9f38edb4a/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d667064662f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-fpdf)[![](https://github.com/codedge/laravel-fpdf/workflows/Tests/badge.svg)](https://github.com/codedge/laravel-fpdf/actions)[![StyleCI](https://camo.githubusercontent.com/ef9c6843c077e1617cad456ba56d966f2616714dcbaaa1c9fab421c637db8b6b/68747470733a2f2f7374796c6563692e696f2f7265706f732f35393530363435312f736869656c64)](https://styleci.io/repos/59506451)[![License](https://camo.githubusercontent.com/6a1178acfb16a94edec38dade8b684e77b0e4b1fb16972e0d10f9be33e144939/68747470733a2f2f706f7365722e707567782e6f72672f636f64656467652f6c61726176656c2d667064662f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/codedge/laravel-fpdf)

Using [FPDF](http://www.fpdf.org/) made easy with Laravel. See [FPDF homepage](http://www.fpdf.org/) for more information about the usage.

Installation using [Composer](https://getcomposer.org/)
-------------------------------------------------------

[](#installation-using-composer)

```
composer require codedge/laravel-fpdf
```

Configuration
-------------

[](#configuration)

Run
`php artisan vendor:publish --provider="Codedge\Fpdf\FpdfServiceProvider" --tag=config`
to publish the configuration file to `config/fpdf.php`.

Usage
-----

[](#usage)

```
// app/Http/routes.php | app/routes/web.php

Route::get('/', function (Codedge\Fpdf\Fpdf\Fpdf $fpdf) {

    $fpdf->AddPage();
    $fpdf->SetFont('Courier', 'B', 18);
    $fpdf->Cell(50, 25, 'Hello World!');
    $fpdf->Output();
    exit;

});
```

### Defining fonts

[](#defining-fonts)

FPDF comes with a set of fonts already defined and stored in the `src/Fpdf/font` directory. If you want to add your own font, please have a look at the [Adding new fonts and encodings](http://www.fpdf.org/en/tutorial/tuto7.htm) tutorial.

You can change the font path, by using the `FPDF_FONTPATH` environment variable.

Use in Laravel Vapor
--------------------

[](#use-in-laravel-vapor)

If you want to use [Laravel Vapor](https://vapor.laravel.com) to host your application, [a special header](https://docs.vapor.build/1.0/projects/development.html#binary-responses) needs to be attached to each response that FPDF returns to your browser. To enable the use of this header, add the following environment variable to the Vapor environment file:

```
FPDF_VAPOR_HEADERS=true
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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.

###  Release Activity

Cadence

Every ~97 days

Recently: every ~75 days

Total

18

Last Release

1957d ago

PHP version history (4 changes)1.0PHP &gt;=5.4.0

1.5.1PHP &gt;=7.2

1.6.0PHP &gt;=7.3

1.7.1PHP &gt;=7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a61fbb91053310302b3256009b67e371e533083b8eea4ae37d3b6a9efa06e2f6?d=identicon)[SamuelMwangiW](/maintainers/SamuelMwangiW)

---

Top Contributors

[![codedge](https://avatars.githubusercontent.com/u/4409904?v=4)](https://github.com/codedge "codedge (127 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (121 commits)")[![dniccum](https://avatars.githubusercontent.com/u/2816415?v=4)](https://github.com/dniccum "dniccum (6 commits)")[![erikn69](https://avatars.githubusercontent.com/u/4933954?v=4)](https://github.com/erikn69 "erikn69 (3 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![mansoorkhan96](https://avatars.githubusercontent.com/u/51432274?v=4)](https://github.com/mansoorkhan96 "mansoorkhan96 (2 commits)")[![SamuelMwangiW](https://avatars.githubusercontent.com/u/1807304?v=4)](https://github.com/SamuelMwangiW "SamuelMwangiW (1 commits)")[![camerontucker](https://avatars.githubusercontent.com/u/11256231?v=4)](https://github.com/camerontucker "camerontucker (1 commits)")[![davidoskay](https://avatars.githubusercontent.com/u/38055056?v=4)](https://github.com/davidoskay "davidoskay (1 commits)")[![no-simpler](https://avatars.githubusercontent.com/u/30579893?v=4)](https://github.com/no-simpler "no-simpler (1 commits)")[![benjivm](https://avatars.githubusercontent.com/u/6797513?v=4)](https://github.com/benjivm "benjivm (1 commits)")

---

Tags

laravelpdffpdf

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.3k87.6M278](/packages/barryvdh-laravel-dompdf)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

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

tcpdf support for Laravel 6, 7, 8, 9, 10, 11

3542.7M5](/packages/elibyy-tcpdf-laravel)[lucasromanojf/laravel5-pdf

Provides the HTML2PDF functionality using the wkhtmltopdf library (Laravel 5)

1271.8k](/packages/lucasromanojf-laravel5-pdf)

PHPackages © 2026

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