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

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

setasign/tfpdf
==============

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

v1.33(3y ago)426.1M—8.7%28[3 issues](https://github.com/Setasign/tFPDF/issues)20LGPL-2.1PHP

Since Sep 5Pushed 2y ago6 watchersCompare

[ Source](https://github.com/Setasign/tFPDF)[ Packagist](https://packagist.org/packages/setasign/tfpdf)[ Docs](http://fpdf.org/en/script/script92.php)[ RSS](/packages/setasign-tfpdf/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (6)Used By (20)

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.33

```

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

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

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

47

—

FairBetter than 94% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity59

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~391 days

Total

5

Last Release

1246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/78b46f7020bdcd25e761812659988691e50aba9a25b2a48ea33f6137f2fc2536?d=identicon)[Setasign](/maintainers/Setasign)

---

Top Contributors

[![JanSlabon](https://avatars.githubusercontent.com/u/12390057?v=4)](https://github.com/JanSlabon "JanSlabon (16 commits)")[![niels-numbers](https://avatars.githubusercontent.com/u/1765602?v=4)](https://github.com/niels-numbers "niels-numbers (2 commits)")

---

Tags

pdfunicodefpdftfpdf

### Embed Badge

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

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

###  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.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)[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)[setasign/fpdi-protection

A FPDI compatible version of the FPDF\_Protection script.

324.3M2](/packages/setasign-fpdi-protection)[tecnickcom/tc-lib-unicode

PHP library containing Unicode methods

10670.0k3](/packages/tecnickcom-tc-lib-unicode)

PHPackages © 2026

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