lpdfio-lpdf
Python 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
pip install lpdfio-lpdf
Usage
from lpdf import L, NoAttr
engine = L.engine()
doc = L.document(DocumentAttr(size='letter', margin='48pt'), [
L.section(NoAttr, [
L.layout(NoAttr, [
L.stack(StackAttr(gap='24pt'), [
L.split(NoAttr, [
L.text(TextAttr(font_size='8pt', color='#888888'), ['ACME CORP']),
L.text(TextAttr(font_size='22pt', bold='true'), ['Project Proposal']),
]),
L.divider(DividerAttr(thickness='xs')),
L.text(TextAttr(font_size='13pt', bold='true'), ['Scope of Work']),
L.flank(FlankAttr(gap='12pt', align='start'), [
L.text(TextAttr(color='#888888', width='24pt'), ['01']),
L.text(NoAttr, ['Discovery & Research']),
]),
]),
]),
]),
])
pdf = engine.render(doc)
Requirements
- Python 3.8+
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.
Metadata
Release files for lpdfio-lpdf 0.13.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lpdfio_lpdf-0.13.0.tar.gz | 20.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lpdfio_lpdf-0.13.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 68.4 kB
Release files / lpdfio_lpdf-0.13.0.tar.gz
| Download URL | lpdfio_lpdf-0.13.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd32894110035458c2ecdaeeb88a176133e82cd11231022c868d1803310e9103
|
|
BLAKE2b-256 checksum How to use checksums |
cb8d36644221015413efd3a786b68417417ef607f248bcdea2ba8ab5067dc68f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / lpdfio_lpdf-0.13.0-py3-none-any.whl
| Download URL | lpdfio_lpdf-0.13.0-py3-none-any.whl |
|---|---|
| Size | 47.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3be81e9b163cce66ae69046625439e2950725c74c255d0434bf1a4dfac92674e
|
|
BLAKE2b-256 checksum How to use checksums |
5ed75c0a7b4bbc14e5a5d26cd8d2ac7bf07a3503b4a75004d8c7ae23cf53840a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|