PHPackages                             lpdfio/lpdf - 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. lpdfio/lpdf

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

lpdfio/lpdf
===========

PHP SDK for Lpdf — PDF as Code on every platform. You describe a document as code or XML. Lpdf renders a compact, pixel-perfect PDF — identical across platforms.

v0.8.0(1mo ago)02proprietaryPHPPHP &gt;=8.2CI passing

Since Apr 26Pushed 1mo agoCompare

[ Source](https://github.com/lpdfio/lpdf-php)[ Packagist](https://packagist.org/packages/lpdfio/lpdf)[ Docs](https://lpdf.io)[ RSS](/packages/lpdfio-lpdf/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (7)Dependencies (1)Versions (9)Used By (0)

[![Lpdf](lpdf-light.png)](lpdf-light.png)

lpdfio/lpdf
===========

[](#lpdfiolpdf)

**PHP SDK for [Lpdf](https://lpdf.io) — PDF as Code on every platform**

You describe a document as code or XML. Lpdf renders a compact, pixel-perfect PDF — identical across platforms.

Installation
------------

[](#installation)

```
composer require lpdfio/lpdf
```

Usage
-----

[](#usage)

```
use Lpdf\L;
use const Lpdf\NoAttr;

$engine = L::engine();

$doc = L::document(new DocumentAttr(size: 'letter', margin: '48pt'), [
    L::section(NoAttr, [
        L::layout(NoAttr, [
            L::stack(new StackAttr(gap: '24pt'), [
                L::split(NoAttr, [
                    L::text(new TextAttr(fontSize: '8pt', color: '#888888'), ['ACME CORP']),
                    L::text(new TextAttr(fontSize: '22pt', bold: 'true'), ['Project Proposal']),
                ]),
                L::divider(new DividerAttr(thickness: 'xs')),
                L::text(new TextAttr(fontSize: '13pt', bold: 'true'), ['Scope of Work']),
                L::flank(new FlankAttr(gap: '12pt', align: 'start'), [
                    L::text(new TextAttr(color: '#888888', width: '24pt'), ['01']),
                    L::text(NoAttr, ['Discovery & Research']),
                ]),
            ]),
        ]),
    ]),
]);

$pdf = $engine->render($doc);
```

Requirements
------------

[](#requirements)

- PHP 8.2+
- [`wasmtime`](https://wasmtime.dev) CLI must be available in `PATH` (used to run the bundled WASI binary).

Docs
----

[](#docs)

[lpdf.io/docs/php](https://lpdf.io/docs/php)

\--

Dual-licensed: Community License (free) and Commercial License (paid). See [LICENSE](LICENSE) for full terms.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance94

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% 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 ~2 days

Total

8

Last Release

30d ago

### Community

Maintainers

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

---

Top Contributors

[![codesensedev](https://avatars.githubusercontent.com/u/48861234?v=4)](https://github.com/codesensedev "codesensedev (34 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lpdfio-lpdf/health.svg)

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

###  Alternatives

[qipsius/tcpdf-bundle

A bundle to easily integrate TCPDF into Symfony

23749.5k](/packages/qipsius-tcpdf-bundle)[radnan/rdn-csv

Laminas module to export and import CSV files

19119.3k](/packages/radnan-rdn-csv)[nilgems/laravel-textract

A Laravel package to extract text from files like DOC, XL, Image, Pdf and more. I've developed this package by inspiring "npm textract".

195.7k](/packages/nilgems-laravel-textract)[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)
