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, DocumentAttr, LayoutAttr, ColumnAttr, RowAttr, TextAttr, DividerAttr
engine = L.engine()
doc = L.document(DocumentAttr(size='letter'), [
L.section(NoAttr, [
L.layout(LayoutAttr(margin='48pt'), [
L.column(ColumnAttr(gap='24pt'), [
L.row(RowAttr(justify='between'), [
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.row(RowAttr(gap='12pt', align='start'), [
L.text(TextAttr(color='#888888', width='24pt'), ['01']),
L.text(TextAttr(width='fill'), ['Discovery & Research']),
]),
]),
]),
]),
])
pdf = engine.render(doc)
Requirements
- Python 3.10+
wasmtimeCLI must be available inPATH(used to run the bundled WASI binary).
Docs
Issues
Report bugs and request features at github.com/lpdfio/lpdf/issues, the one tracker for the engine, the SDKs and the VS Code extension. Pull requests are not accepted.
--
Dual-licensed: Community License (free) and Commercial License (paid). See LICENSE for full terms.
Metadata
Release files for lpdfio-lpdf 0.27.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 | Provenance | |
|---|---|---|---|---|
| lpdfio_lpdf-0.27.0.tar.gz | 31.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lpdfio_lpdf-0.27.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.2 kB
Release files / lpdfio_lpdf-0.27.0.tar.gz
| Download URL | lpdfio_lpdf-0.27.0.tar.gz |
|---|---|
| Size | 31.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1113e482ecbecfa256686db7ae5750a5318267e9d53c447048f128516abd345d
|
|
BLAKE2b-256 checksum How to use checksums |
8fcbb935eb8f26b7e3970cb2f53827ca0b1534e2e973a2d9bd1d55ae9210563f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Release files / lpdfio_lpdf-0.27.0-py3-none-any.whl
| Download URL | lpdfio_lpdf-0.27.0-py3-none-any.whl |
|---|---|
| Size | 62.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c22a32183c4182ecb15dd6dc4af7977aba1bcbcf52b3204ab7dcc771a0c75dc
|
|
BLAKE2b-256 checksum How to use checksums |
8d3b0cd4c4faef1a6ba3a6b26bd0af2afba3c588b9032d05979ddb1890dea817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.15
|
Security for lpdfio-lpdf 0.27.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.