PHPackages                             xu/facebook - 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. xu/facebook

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

xu/facebook
===========

A simple facebook generating class based on FPDF.

1.2.0(8y ago)0592MITPHPPHP &gt;=5.4.0

Since Jun 30Pushed 8y ago1 watchersCompare

[ Source](https://github.com/xu-li/facebook)[ Packagist](https://packagist.org/packages/xu/facebook)[ Docs](https://github.com/xu-li/facebook)[ RSS](/packages/xu-facebook/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Facebook
========

[](#facebook)

A simple facebook generating class based on [FPDF](http://www.fpdf.org/).

Install
-------

[](#install)

Via Composer

```
$ composer require xu/facebook
```

Usage
-----

[](#usage)

```
// create a facebook instance
$pdf = new Facebook();

// set the default font
$pdf->SetFont('Times', '', 12);

// add users
$pdf->addUsers([
    User::fromArray([
        'image'      => __DIR__ . "/blue.png",
        'name'       => "lixu",
        'desc'       => "Hi, \nI am lixu.",
    ])
]);

// render it
$pdf->render();

// output to browser
$pdf->Output();
```

Example
-------

[](#example)

Please see [example](https://github.com/xu-li/facebook/blob/master/examples/index.php) for details.

Testing
-------

[](#testing)

```
$ phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/xu-li/facebook/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Xu Li](https://github.com/xu-li)
- [All Contributors](https://github.com/xu-li/facebook/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~92 days

Total

4

Last Release

3013d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/171665?v=4)[lixu](/maintainers/xu-li)[@xu-li](https://github.com/xu-li)

---

Top Contributors

[![xu-li](https://avatars.githubusercontent.com/u/171665?v=4)](https://github.com/xu-li "xu-li (5 commits)")

---

Tags

facebookfpdfpdfpdf-generationpdffacebookfpdf

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xu-facebook/health.svg)

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

###  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.8M283](/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.8M267](/packages/setasign-fpdf)[setasign/fpdi-protection

A FPDI compatible version of the FPDF\_Protection script.

324.4M2](/packages/setasign-fpdi-protection)[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.5M42](/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.0M27](/packages/fpdf-fpdf)

PHPackages © 2026

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