Quick start
From download to your first PDF
Three steps and about five minutes. Pick the package that matches your stack and the install line and first program appear below — both exactly as they ship in the download.
1. Install PHP
composer require lumaspdf/lumaspdf
# or: unzip php.zip and require LumasPdf.php
2. Write a PDF
The smallest complete program: create the document, write to it, close it.
<?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();
3. Remove the watermark when you are ready
Everything above works with no key at all. Output carries an evaluation watermark until a key is applied — nothing else is limited, and there is no time limit on trying it.
Before you deploy this one
A pure-PHP binding over FFI: no compiled extension to match.
win-x64 linux-x86 linux-x64 linux-arm32 linux-arm64 macos
- 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
If the first program does not run
Almost every first-run problem is the same one: the process cannot find the engine library, or it found one built for the other bitness. The package page for your stack lists what has to sit where, and the knowledge base has the platform-specific version of that answer.