Skip to main content

Ironhide HTML-to-PDF Python SDK

Zero-dependency, PEP-561 typed Python 3.10+ SDK over the Ironhide C ABI v1 (ctypes).

Quick Start

from pathlib import Path
from ironhide_html_to_pdf import Font, render_pdf

result = render_pdf(
    "<!doctype html><h1>Invoice #1042</h1>",
    paper="a4",
    print_backgrounds=True,
    fonts=[Font.from_file("DejaVu Sans", "./fonts/DejaVuSans.ttf")],
)
Path("invoice.pdf").write_bytes(result.pdf)

Streaming with Context Manager

Low-level Request, render_preloaded, and Session remain available for streaming, custom limits, and explicit resource callbacks:

import io
from ironhide_html_to_pdf import ResourceSupply, Session

buf = io.BytesIO()
with Session(request) as session:
    report = session.drive_to_stream(
        buf,
        on_resource=lambda req: ResourceSupply(
            sequence=req.sequence,
            url=req.url,
            mime_type="font/ttf",
            data=fetch_bytes(req.url),
        ),
    )

Run Tests

PYTHONPATH=sdk/python python3 -m unittest discover -s sdk/python/tests -v

Metadata

Release files for ironhide-html-to-pdf 1.1.0

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

Built distribution (wheel)

Table of built distributions (wheels) for ironhide-html-to-pdf 1.1.0
File Interpreter ABI Platform Actions
ironhide_html_to_pdf-1.1.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for ironhide_html_to_pdf-1.1.0-py3-none-manylinux_2_28_x86_64.whl

Release files / ironhide_html_to_pdf-1.1.0-py3-none-manylinux_2_28_x86_64.whl

Download URL ironhide_html_to_pdf-1.1.0-py3-none-manylinux_2_28_x86_64.whl
Size 5.6 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
181ddbd4539b88bfe9d74f756abea070c1d5531c874c147ec7aeaff2c9243078
BLAKE2b-256 checksum
How to use checksums
8728d383a885cc930c502bf4d7022c78b8244ad301c971fc499e0e3806616074
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for ironhide-html-to-pdf 1.1.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.

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