PHPackages                             robgridley/pdflib - 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. robgridley/pdflib

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

robgridley/pdflib
=================

PDFlib made usable.

112.0k↓50%6[1 PRs](https://github.com/robgridley/pdflib/pulls)PHP

Since Nov 4Pushed 6mo ago3 watchersCompare

[ Source](https://github.com/robgridley/pdflib)[ Packagist](https://packagist.org/packages/robgridley/pdflib)[ RSS](/packages/robgridley-pdflib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PDFlib Wrapper
==============

[](#pdflib-wrapper)

I use this PDFlib wrapper in my own projects. It is feature incomplete and provided as-is. Updates are irregular and they may break the API. Great sales pitch, eh?

Example
-------

[](#example)

This example creates a new PDF, places a page from an existing PDF, uses PDFlib PPS to fill a text block, and draws a red circle.

```
use Pdf\Color\CmykColor;
use Pdf\Drawing;
use Pdf\PdfBuilder;

$pdf = new PdfBuilder;

$document = $pdf->import(file_get_contents('test.pdf'));
$page = $document->page(1, ['cloneBoxes']);

$pdf->addPage();
$pdf->placePage($page, 0, 0, ['cloneBoxes']);

$page->block('address')->fill('123 Fake St., Toronto, ON  M1A 1A1');

$pdf->draw(function (Drawing $drawing) {
    $drawing->stroke(new CmykColor(0, 100, 100, 0), 0.25)->circle(100, 100, 50)->paintStroke();
});

echo $pdf->render();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance47

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity13

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/1b86b46c6650529f0d67312b873a0b1f77ca82937ebf12108f4a38a8f0230dc0?d=identicon)[robgridley](/maintainers/robgridley)

---

Top Contributors

[![robgridley](https://avatars.githubusercontent.com/u/9560656?v=4)](https://github.com/robgridley "robgridley (52 commits)")

### Embed Badge

![Health badge](/badges/robgridley-pdflib/health.svg)

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

###  Alternatives

[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[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.2k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)[setasign/tfpdf

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

426.1M30](/packages/setasign-tfpdf)[aspera/xlsx-reader

Spreadsheet reader library for XLSX files

52742.2k5](/packages/aspera-xlsx-reader)

PHPackages © 2026

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