PHP

A pure-PHP binding over FFI: no compiled extension to match.

Language binding win-x64 linux-x86 linux-x64 linux-arm32 linux-arm64 macos

Who this is for: PHP 7.4 and later, generating PDFs server-side.

One package covers every PHP version, because the binding is PHP source over FFI rather than a compiled extension. LumasPdf.php is the flat 1:1 API, LumasPdfOO.php an object wrapper over it.

Try it, then licence it

The download is public and needs no key. Unlicensed output carries an evaluation watermark and nothing else is restricted.

Need a quote or a PO?

Is this the right package for you?

Best for

You generate or edit PDF from PHP — invoices, statements, reports — and want the native engine rather than a pure-PHP renderer.

Not the right choice when

Your host cannot enable the FFI extension. The binding is pure PHP over FFI, so without it there is nothing to load.

What is in the download

Generated from the packaging script, not from a description. Each row names the build output the binary came from.

php.zip
Platform Built from Licence covers it
win-x64 WIN64_DLL Yes
linux-x86 cmake_linux_redist_x86 Yes
linux-x64 cmake_linux_redist_x64 Yes
linux-arm32 cmake_linux_redist_arm32 Yes
linux-arm64 cmake_linux_redist_arm64 Yes
macos libLumasPdf.dylib Yes

Install

shell
composer require lumaspdf/lumaspdf
# or: unzip php.zip and require LumasPdf.php

Your first PDF

The smallest complete program: create, write, close.

php
<?php
require 'LumasPdfOO.php';

$pdf = new LumasPdfOO();
$pdf->CreatePDF('hello.pdf');
$pdf->Append();
$pdf->SetFont('Helvetica', 0, 24.0, true, 0);
$pdf->WriteFText(0, 'Hello from LumasPDF');
$pdf->EndPage();
$pdf->CloseFile();

The full quick start →

How it deploys

No compiled PHP module: the binding is PHP source that opens the engine library through FFI. That means no version-matched extension to rebuild after a PHP upgrade.

Platforms

Two different questions, answered separately, because for one package today they have different answers.

Platform Licence covers it Binary in the download
win-x64 Yes Yes
linux-x86 Yes Yes
linux-x64 Yes Yes
linux-arm32 Yes Yes
linux-arm64 Yes Yes
macos Yes Yes

Requirements

  • bin/win-x64
  • bin/linux-x64
  • bin/linux-x86
  • bin/linux-arm64
  • bin/linux-arm32
  • bin/osx
  • 15
  • LumasPdf.php
  • LumasPdfOO.php
  • LumasRpt.php
  • lumaspdf_preload.php
  • composer.json
  • docs/php_guide.md
  • examples/run_all.php

Before you deploy

Editions for this package

The edition decides which engine features your key turns on. Every one of them is royalty-free: you may redistribute the engine inside your application at no per-copy cost.

Edition Price Includes Available add-ons Buy
Starter EUR 249.00 PDF Creation · Royalty free delivery Buy →
Lite EUR 399.00 PDF Creation · PDF Import · Royalty free delivery Buy →
Professional EUR 699.00 PDF Creation · PDF Import · PDF Optimization · Rendering Engine · Royalty free delivery PDF/A Extension · LumasReport Buy →
Enterprise EUR 1799.00 PDF Creation · PDF Import · PDF Optimization · Rendering Engine · Source Codes · Royalty free delivery PDF/A Extension · LumasReport Buy →

Releases

Latest stable
4.2.2
built 2026-08-10 · release history

Your key licenses every build released on or before your coverage date — including this one, if it falls inside it.

Known issues

No published, unfixed defect names this package. The whole list is public.

Questions about this package

Do I pay a royalty for every copy I ship?

No. Every edition is royalty-free: you may redistribute the engine inside your own application to as many end users as you like, with no per-copy fee and no runtime licence for them to accept.

Does the licence need to phone home or be activated?

No. Your build verifies the key locally, in your process. There is no activation call, no deactivation, and no server for us to take down — which is why the engine works in an air-gapped network and in a container that scales to zero.

What happens when my maintenance period ends?

Nothing stops working. A key licenses any build released on or before your coverage date, forever, including in production. Maintenance decides which BUILDS the key covers, never when it expires — the engine compares against a build date and never against the clock.

What does the free download do without a key?

Everything. The download is public and unrestricted and needs no key to run; unlicensed output simply carries an evaluation watermark. Register and we send a trial key that removes it, so you can evaluate the real output before you buy.

Can we buy on a purchase order and get a VAT invoice?

Yes. Request a quote and we will price the configuration, invoice against your PO, and show the VAT treatment for your country on the quote itself rather than after checkout.

Try PHP before you decide

Public download, no account, no card. Register only when you want the evaluation watermark gone.