PHPackages                             10usb/pdf-lib - 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. 10usb/pdf-lib

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

10usb/pdf-lib
=============

Library for loading or creating a PDF

1.0.0(8y ago)051PHPPHP &gt;=7.0

Since Aug 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/10usb/pdf-lib)[ Packagist](https://packagist.org/packages/10usb/pdf-lib)[ RSS](/packages/10usb-pdf-lib/feed)WikiDiscussions master Synced 2w ago

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

pdf-lib
=======

[](#pdf-lib)

A PHP PDF library that is not created to easily add rich content *(HTML etc)* to a PDF file. But rather allowing any valid PDF content to be added to the file without the excess of functionality that **"tries"** to emulate HTML like behavior and limit/complicate simple tasks. This library takes the concept that every page is no more then just a canvas area that can takes 2D graphics rendering commands. Any other functionality there might be is considers meta data.

Example
-------

[](#example)

```
$file = new File('test.pdf');
$file->getInformation()
	->setTitle('My PDF Library')
	->setSubject('How to create a pdf library')
	->setAuthor('10usb');

$catalog = $file->getCatalog()->setSize(595.276, 841.890);

$page = $catalog->addPage();

$canvas = $page->getCanvas();

$canvas->setStrokeColor(255, 0, 255);
$canvas->setLineWidth(5);
$canvas->line(30, 30, 50, 100);

$canvas->setFillColor(50, 50, 50);
$canvas->setFont($page->getFont('Helvetica', 11));
$canvas->text(50, 50, "PDF Library");
$canvas->text(50, 70, "You start with...");

$file->flush();
```

Nice to have
------------

[](#nice-to-have)

While a lot can be done, more can be done.

- Ability to set the compression/filter methods to use (or none)
- Append the contents of one file to then end of an other (or even better insert between)
- Clean-up an incremental updated pdf file
- Add optimization of render insttructions
- Add optimization by shared resource dictionary between pages

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3243d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4085551?v=4)[Tinus Bruins](/maintainers/10usb)[@10usb](https://github.com/10usb)

---

Top Contributors

[![10usb](https://avatars.githubusercontent.com/u/4085551?v=4)](https://github.com/10usb "10usb (43 commits)")

### Embed Badge

![Health badge](/badges/10usb-pdf-lib/health.svg)

```
[![Health](https://phpackages.com/badges/10usb-pdf-lib/health.svg)](https://phpackages.com/packages/10usb-pdf-lib)
```

###  Alternatives

[qipsius/tcpdf-bundle

A bundle to easily integrate TCPDF into Symfony

23749.5k](/packages/qipsius-tcpdf-bundle)[macopedia/magmi2

Magento Mass Importer 'Magmi' for Magento 2

11615.7k](/packages/macopedia-magmi2)[tarfin-labs/easy-pdf

Makes pdf processing easy.

1719.4k](/packages/tarfin-labs-easy-pdf)[akeneo-labs/excel-connector-bundle

Akeneo PIM Excel connector bundle

166.4k](/packages/akeneo-labs-excel-connector-bundle)

PHPackages © 2026

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