Skip to main content
Lpdf - PDF as Code

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+
  • wasmtime CLI must be available in PATH (used to run the bundled WASI binary).

Docs

lpdf.io/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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lpdfio-lpdf 0.27.1
File Size Uploaded Provenance
lpdfio_lpdf-0.27.1.tar.gz 779.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lpdfio-lpdf 0.27.1
File Interpreter ABI Platform
lpdfio_lpdf-0.27.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / lpdfio_lpdf-0.27.1.tar.gz

Download URL lpdfio_lpdf-0.27.1.tar.gz
Size 779.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6c00a000a5581969e68129c6ee73e7ab7b8a98c3cb122a1ff8d341dae5b8631b
BLAKE2b-256 checksum
How to use checksums
12c192535306217bc5ab2899a86410c0727cb91f9643138a510a168bc12f0e3f
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.1-py3-none-any.whl

Download URL lpdfio_lpdf-0.27.1-py3-none-any.whl
Size 813.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f010361c40eb06264febd31d1dc89f62d83c3fe1ad04ce4f79d9cf426ace6e1b
BLAKE2b-256 checksum
How to use checksums
126e9ebf6a0afd01c92be1989336cc9fa0be714ee75580795083f92f0c1e7130
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.1

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.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page