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

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

faimmedia/fpdf-utf8
===================

tfpdf

v3.0.3(5y ago)115.3k↓44.3%2LGPL-3.0-or-laterPHPPHP &gt;= 7.0

Since Feb 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/FaimMedia/fpdf-utf8)[ Packagist](https://packagist.org/packages/faimmedia/fpdf-utf8)[ Docs](http://github.com/FaimMedia/tfpdf)[ RSS](/packages/faimmedia-fpdf-utf8/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (21)Used By (0)

FPDF-UTF8 library
=================

[](#fpdf-utf8-library)

This is an unofficial repository for the [FPDF-library](http://fpdf.org/fr/script/script92.php).
The purpose is to be able to build automatic packages using [composer](http://packagist.org).

Install
-------

[](#install)

You can install this library by editing (or creating) your `composer.json`:

```
{
	"require": {
		"faimmedia/fpdf-utf8": "*"
	}
}

```

And run `composer update` or `composer install`.

Or you can simply run the `composer` command, `composer require faimmedia/fpdf-utf8`.

Usage
-----

[](#usage)

### Namespacing

[](#namespacing)

The namespacing has been changed to `FaimMedia\FPDF`.

### Caching

[](#caching)

In this version you can set the cache folder yourself, so it will not put the cache files into the same directory as the font-files. Please note that if you do not set the cache folder, no caching is used and documents may be created a little bit slower.

```
use FaimMedia\FPDF\PDF;

$fpdf = new PDF();
$fpdf->setFontPath('/font/unifont/');
$fpdf->setCache('/cache/');
$fpdf->AddPage();
$fpdf->AddFont('OpenSans');
$fpdf->SetFont('OpenSans');
$fpdf->Write('This is a test PDF with OpenSans as font');
$fpdf->Output();

```

### Exception

[](#exception)

A custom exception class `FPDFException` has been created. For all exception error codes, please take a look at the `src/FPDF/Exception/FPDFException.php` file.

About
-----

[](#about)

### What is FPDF-UTF8?

[](#what-is-fpdf-utf8)

FPDF-UTF8 is a version of FPDF, which supports UTF-8 and font-subsetting.
This is a updated version (fork) of [tFPDF](https://github.com/DocnetUK/tFPDF).

### 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 advantages: 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 activate compression and GD for GIF support). It works with PHP 4 and PHP 5 (the latest version requires at least PHP 4.3.10).

The tutorials will give you a quick start. The complete online documentation is here and download area is there. It is strongly advised to read the FAQ which lists the most common questions and issues.

A script section is available and provides some useful extensions (such as bookmarks, rotations, tables, barcodes...).

### 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, provided you own TrueType or Type1 fonts with the desired character set. Chinese, Japanese and Korean are supported too. UTF-8 support 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.

Source attribution
------------------

[](#source-attribution)

The Code 128 and Code 39 barcode library code was taken directly from the FPDF website, where source attribution is vague at best, but mostly non-existent. If you need source attribution applying for your code included here, please raise an issue.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 62.8% 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 ~185 days

Recently: every ~303 days

Total

19

Last Release

1869d ago

Major Versions

v1.4.1 → v2.0.02016-10-24

v2.0.7 → v3.0.0-beta2017-12-08

PHP version history (2 changes)v1.3PHP &gt;= 5.5

v3.0.0-betaPHP &gt;= 7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/024ab16807383628de696767bd28cba0fad1517d115e9046e5333d83f7d08ead?d=identicon)[FaimMedia](/maintainers/FaimMedia)

---

Top Contributors

[![FaimMedia](https://avatars.githubusercontent.com/u/11771199?v=4)](https://github.com/FaimMedia "FaimMedia (54 commits)")[![kazsaj](https://avatars.githubusercontent.com/u/5666877?v=4)](https://github.com/kazsaj "kazsaj (10 commits)")[![rev42](https://avatars.githubusercontent.com/u/681069?v=4)](https://github.com/rev42 "rev42 (10 commits)")[![dblencowe](https://avatars.githubusercontent.com/u/88084?v=4)](https://github.com/dblencowe "dblencowe (7 commits)")[![cdburgess](https://avatars.githubusercontent.com/u/216284?v=4)](https://github.com/cdburgess "cdburgess (2 commits)")[![hultberg](https://avatars.githubusercontent.com/u/1257913?v=4)](https://github.com/hultberg "hultberg (1 commits)")[![rserale](https://avatars.githubusercontent.com/u/8452531?v=4)](https://github.com/rserale "rserale (1 commits)")[![slokhorst](https://avatars.githubusercontent.com/u/8083666?v=4)](https://github.com/slokhorst "slokhorst (1 commits)")

---

Tags

pdfutf-8fpdf

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mpdf/mpdf

PHP library generating PDF files from UTF-8 encoded HTML

4.7k77.1M493](/packages/mpdf-mpdf)[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.2k142.4M231](/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.

76863.8M227](/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.

426.1M30](/packages/setasign-tfpdf)[tmw/fpdm

PDF form filling using FPDM Class written by FPDF author Olivier

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

FPDF Composer Wrapper

512.7M22](/packages/fpdf-fpdf)

PHPackages © 2026

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