lpdfio/lpdf
最新稳定版本:v0.8.0
Composer 安装命令:
composer require 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.
README 文档
README
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.
Installation
composer require lpdfio/lpdf
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
- PHP 8.2+
wasmtimeCLI must be available inPATH(used to run the bundled WASI binary).
Docs
--
Dual-licensed: Community License (free) and Commercial License (paid). See LICENSE for full terms.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2026-04-26