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

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

scragg0x/fpdf
=============

Unofficial PSR-0 compliant version of the FPDF library

1.7.3(11y ago)0189no usage restrictionPHPPHP &gt;=5.3.0

Since May 13Pushed 11y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (6)Used By (0)

FPDF
====

[](#fpdf)

[![Latest Stable Version](https://camo.githubusercontent.com/46f2918fb4046a4f6b5908cdeeddacda76138f90175a422139ec99dbe1e05b4b/68747470733a2f2f706f7365722e707567782e6f72672f6974627a2f667064662f762f737461626c652e706e67)](https://packagist.org/packages/itbz/fpdf)

Unofficial PSR-0 compliant version of the FPDF library

This is version 1.7 with some minor changes:

- the library is namespaced in fpdf. To create instance use

    $fpdf = new \\fpdf\\FPDF();
- directory structure follow the PSR-0 standard with src/ as root
- on error a RuntimeException is thrown instead on lib dramatically dying
- constructor is renamed `__construct` instead of `FPDF`

Installing with composer
------------------------

[](#installing-with-composer)

The package exists in the packagist repository as `itbz/fpdf`.

FPDF\_EXTENDED
--------------

[](#fpdf_extended)

This package also contains some extensions that break backwards compatibility. To access the enhanced functinality use `FPDF_EXTENDED` instead of `FPDF`.

- FPDF\_EXTENDED expects all input to be UTF-8 encoded. FPDF natively expects all input to be ISO-8859-1 encoded and recommends the use of utf8\_decode() when working with utf-8 encoded strings.
- FPDF uses a somewath strange syntax for printing the total number of pages in the pdf. FPDF\_EXTENDED defines two methods to handle this. `TotalPagesNo()`returns a string that will be replaced with total number of pages at output. `PaginationStr()` takes an optional delimiter (default '/') and retuns '{current page} / {total number of pages}'.
- Calling `AliasNbPages()` is no longer necessary.
- You may set an image path using `setImagePath()` and `image()` will be able to understand relative paths.
- FPDF\_EXTENDED gracefuly handles missing font styles. If a font is only defined (added) for one style (eg. bold) and you try to use another (eg. italic) this FPDF\_EXTENDED fallbacks to the defined style (eg. bold). Regular styles takes precedence.
- FPDF\_EXTENDED defines `moveX()` and `moveY()` to move the cursor, in addition to FPDFs `setX()` and `setY()`.
- Subclasses of FPDF\_EXTENDED may define `draw()`. Draw is called just before pdf is rendered. In this may actions can be taken just before pdf creation.
- FPDF\_EXTENDED defines `GetPdf()` as a shorthand for outputing the pdf as a raw string.
- AS of version 1.7.2 FPDF\_EXTENDED defines WriteXY() for writing to a specified position.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 84.6% 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 ~322 days

Total

4

Last Release

4141d ago

### Community

Maintainers

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

---

Top Contributors

[![clement-bongibault](https://avatars.githubusercontent.com/u/4737463?v=4)](https://github.com/clement-bongibault "clement-bongibault (11 commits)")[![scragg0x](https://avatars.githubusercontent.com/u/222611?v=4)](https://github.com/scragg0x "scragg0x (1 commits)")[![vedosis](https://avatars.githubusercontent.com/u/3306521?v=4)](https://github.com/vedosis "vedosis (1 commits)")

### Embed Badge

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

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

###  Alternatives

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.2k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M100](/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.6M128](/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)
