PHPackages                             anthony-buisson/tfpdf - 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. anthony-buisson/tfpdf

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

anthony-buisson/tfpdf
=====================

This class is a modified version of FPDF that adds UTF-8 support. It is based on FPDF 1.7.

138PHP

Since Dec 27Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Anthony-Buisson/tFpdf)[ Packagist](https://packagist.org/packages/anthony-buisson/tfpdf)[ RSS](/packages/anthony-buisson-tfpdf/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

tFPDF
=====

[](#tfpdf)

**This repository is only made for cloning official tFPDF releases which are available at:  THERE WILL BE NO DEVELOPMENT IN THIS REPOSITORY!**

*The only change in this version is that the require\_once() calls to font/unifont/ttfonts.php are commented and resolved through the composer autoloader. The demo ex.php was changed accordingly, too.*

tFPDF accepts UTF-8 encoded text. It embeds font subsets allowing small PDF files.

It requires a folder 'unifont' as a subfolder of the 'font' folder.

You should make the 'unifont' folder writeable (CHMOD 755 or 644). Although this is not essential, it allows caching of the font metrics the first time a font is used, making subsequent uses much faster.

All tFPDF requires is a .ttf TrueType font file. The file should be placed in the 'unifont' directory. Optionally, you can also define the path to your system fonts e.g. 'C:\\Windows\\Font' (see the example ex.php file) and reference TrueType fonts in this directory.

Pass a fourth parameter as true when calling AddFont(), and use utf-8 encoded text when using Write() etc.

Installation with [Composer](https://packagist.org/packages/setasign/tfpdf)
---------------------------------------------------------------------------

[](#installation-with-composer)

If you're using Composer to manage dependencies, you can use

```
$ composer require setasign/tfpdf:1.25

```

or you can include the following in your composer.json file:

```
{
    "require": {
        "setasign/tfpdf": "1.25"
    }
}
```

Usage
-----

[](#usage)

Notice that tFPDF is not name-spaced. You can extend the class this way:

```
namespace your\namespace;

class Document extends \tFPDF
```

or create an instance this way:

```
$pdf = new \tFPDF();
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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/88a347db711aa94ca4537794e253d791c049d4ffbc6808e9eb92247dfcb4ac85?d=identicon)[Anthony-Buisson](/maintainers/Anthony-Buisson)

---

Top Contributors

[![Anthony-Buisson](https://avatars.githubusercontent.com/u/37698995?v=4)](https://github.com/Anthony-Buisson "Anthony-Buisson (6 commits)")

### Embed Badge

![Health badge](/badges/anthony-buisson-tfpdf/health.svg)

```
[![Health](https://phpackages.com/badges/anthony-buisson-tfpdf/health.svg)](https://phpackages.com/packages/anthony-buisson-tfpdf)
```

###  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)
