Skip to main content
Lpdf - PDF as Code

lpdfio-lpdf

lpdfio-lpdf is the Python SDK for Lpdf, the PDF engine that renders a document written in XML or built in code to the same PDF in every language.

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.11 or later, on Linux (x86_64 or aarch64, glibc or musl), macOS (x86_64 or arm64) or Windows (x64 or arm64)
  • Nothing else: the engine runs inside Python on the wasmtime package, which pip installs with the SDK

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.


Licensed under the Lpdf License. See LICENSE for full terms.

Metadata

Release files for lpdfio-lpdf 0.37.0

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.37.0
File Size Uploaded Provenance Actions
lpdfio_lpdf-0.37.0.tar.gz 2.3 MB Without provenance Details for lpdfio_lpdf-0.37.0.tar.gz

Built distribution (wheel)

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

Total release size: 4.6 MB

Release files / lpdfio_lpdf-0.37.0.tar.gz

Download URL lpdfio_lpdf-0.37.0.tar.gz
Size 2.3 MB
Tags Source
SHA-256 checksum
How to use checksums
3f01fcdfcc2335d8a5d78e209ccc1cbe2fd49562702e0043aa429d1ab87bc3a5
BLAKE2b-256 checksum
How to use checksums
7f5865c8412e05a527aba8402c5405982606dd36ed6013e9b575e5c60a212807
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / lpdfio_lpdf-0.37.0-py3-none-any.whl

Download URL lpdfio_lpdf-0.37.0-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d4bb8c6340d972e7a4a7f853c327ec78a5bd835c50f2d7f89ed42435f12ad7b1
BLAKE2b-256 checksum
How to use checksums
0b66cca2c4fdcbdc18af0cb504cfdfcf12b1ba4093e1df4451518775d6f9762f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for lpdfio-lpdf 0.37.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.

Release history Release notifications | RSS feed

This release

0.37.0 This release

2 release files No provenance

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