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

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

fawno/fpdf
==========

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

1.90.0(5d ago)1912.0k↑44.3%5[1 issues](https://github.com/fawno/FPDF/issues)2MITPHPPHP &gt;=7.2CI passing

Since Apr 27Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/fawno/FPDF)[ Packagist](https://packagist.org/packages/fawno/fpdf)[ Docs](http://www.fpdf.org)[ RSS](/packages/fawno-fpdf/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (9)Versions (38)Used By (2)

[![GitHub Workflow](https://github.com/fawno/FPDF/actions/workflows/php.yml/badge.svg)](https://github.com/fawno/FPDF/actions/workflows/php.yml)[![GitHub license](https://camo.githubusercontent.com/70db8c31b9a1504a342660383bfc3bdef76cd06ce4f3be35784084729cb7d471/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6661776e6f2f46504446)](https://github.com/fawno/FPDF/blob/master/LICENSE)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/3e14c6117582d817d23b42382d55e1381a51bea59fa315637e074f915c3c8790/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f6661776e6f2f46504446)](https://github.com/fawno/FPDF/tags)[![GitHub release](https://camo.githubusercontent.com/485b3add952bc9b2e98480b14ed67bb682c39a6682ad5a7576fa49d6fb05873f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6661776e6f2f46504446)](https://github.com/fawno/FPDF/releases)[![Packagist](https://camo.githubusercontent.com/322103d5b8aaf3e4624696ad94b6af7c2572eb1d679b774d25edffbf660d0374/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6661776e6f2f66706466)](https://packagist.org/packages/fawno/fpdf)[![Packagist Downloads](https://camo.githubusercontent.com/508fa4b81b68e28222c87c06e98e093d7740e9f77af9f2f991507fc14ac8b5a9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6661776e6f2f66706466)](https://packagist.org/packages/fawno/fpdf/stats)[![GitHub issues](https://camo.githubusercontent.com/dcbed014299b57d1b9094ffa48ec592b3a517c6b7b66fb5288b09d1a8d7ea1d0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6661776e6f2f46504446)](https://github.com/fawno/FPDF/issues)[![GitHub forks](https://camo.githubusercontent.com/eab3eedb4ed4a8f46a603040e55545252969f46b273c330fa2a087df1366abb6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6661776e6f2f46504446)](https://github.com/fawno/FPDF/network)[![GitHub stars](https://camo.githubusercontent.com/0f08e04b24b14a623427c5b52ea26a47acf9621b0708abd8d10e4f1bdcf4a970/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6661776e6f2f46504446)](https://github.com/fawno/FPDF/stargazers)

FPDF
====

[](#fpdf)

What is FPDF?
-------------

[](#what-is-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 benefits: high level functions. Here is a list of its main features:

- Choice of measure unit, page format and margins
- Page header and footer management
- Automatic page break
- Automatic line break and text justification
- Image support (JPEG, PNG and GIF)
- Colors
- Links
- TrueType, Type1 and encoding support
- Page compression

FPDF requires no extension (except Zlib to enable compression and GD for GIF support). The latest version requires at least PHP 5.1 and is compatible with PHP 7 and PHP 8.

The [tutorials](http://fpdf.org/en/tutorial/index.php) will give you a quick start. The complete online documentation is [here](http://fpdf.org/en/doc/index.php) and download area is [there](http://fpdf.org/en/download.php). It is advised to read the [FAQ](http://fpdf.org/en/FAQ.php) which lists the most common questions and issues.

A [script](http://fpdf.org/en/script/index.php) section is available and provides some useful extensions (such as bookmarks, rotations, tables, barcodes...). Also, some of these scripts are delivered as traits with this package, you can check the list of available scripts [here](scripts).

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

[](#installation)

You can install the package via composer:

```
composer require fawno/fpdf
```

What languages can I use?
-------------------------

[](#what-languages-can-i-use)

The class can produce documents in many languages other than the Western European ones: Central European, Cyrillic, Greek, Baltic and [Thai](http://fpdf.org/en/script/script87.php), provided you own TrueType or Type1 fonts with the desired character set. [UTF-8 support](http://fpdf.org/en/script/script92.php) is also available.

What about performance?
-----------------------

[](#what-about-performance)

Of course, the generation speed of the document is less than with PDFlib. However, the performance penalty keeps very reasonable and suits in most cases, unless your documents are particularly complex or heavy.

For any remark, question or problem, you can leave a message on the [forum](http://fpdf.org/phorum/) (you don't need to register).

You can write to me [here](mailto:oliver@fpdf.org) (but please use the forum for basic questions).

About this repository
---------------------

[](#about-this-repository)

The `/fpdf` directory contains a clone of the official FPDF releases, available at . No modifications will be made to that directory, which contains the history of changes between versions.

FawnoFPDF Class
===============

[](#fawnofpdf-class)

What is FawnoFPDF?
------------------

[](#what-is-fawnofpdf)

FawnoFPDF is a wrapper FPDF class, FawnoFPDF already includes all the available scripts in the [scripts section](scripts). Also, it includes support for [Setasign/FPDI](https://github.com/Setasign/FPDI).

Usage
-----

[](#usage)

In your php file that you want to use the class add a use statement.

```
use Fawno\FPDF\FawnoFPDF;
```

Then use as per the [FPDF documentation](http://fpdf.org/en/tutorial/index.php).

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

Alternatively you can extend as a typical php class and add your own custom scripts.

```
class CustomPdf extends FawnoFPDF
{
    public function __construct(
        $orientation = 'P',
        $unit = 'mm',
        $size = 'letter'
    ) {
        parent::__construct( $orientation, $unit, $size );
        // ...
    }
}
```

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance94

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.7% 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.

###  Release Activity

Cadence

Every ~45 days

Recently: every ~74 days

Total

35

Last Release

5d ago

### Community

Maintainers

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

---

Top Contributors

[![alphp](https://avatars.githubusercontent.com/u/8992091?v=4)](https://github.com/alphp "alphp (78 commits)")[![erikn69](https://avatars.githubusercontent.com/u/4933954?v=4)](https://github.com/erikn69 "erikn69 (23 commits)")[![angeljqv](https://avatars.githubusercontent.com/u/79208641?v=4)](https://github.com/angeljqv "angeljqv (2 commits)")

---

Tags

fpdfpdfpdf-generationphp-librarypdffpdf

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[setasign/fpdi

FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.

1.2k155.8M286](/packages/setasign-fpdi)[setasign/fpdf

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

81070.8M272](/packages/setasign-fpdf)[setasign/tfpdf

This class is a modified version of FPDF that adds UTF-8 support. The latest version is based on FPDF 1.85.

437.5M44](/packages/setasign-tfpdf)[tmw/fpdm

PDF form filling using FPDM Class written by FPDF author Olivier

129674.6k3](/packages/tmw-fpdm)[fpdf/fpdf

FPDF Composer Wrapper

573.0M28](/packages/fpdf-fpdf)[setasign/fpdi-protection

A FPDI compatible version of the FPDF\_Protection script.

324.4M2](/packages/setasign-fpdi-protection)

PHPackages © 2026

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