Skip to main content

ironpress

Pure Rust HTML/CSS/Markdown to PDF converter. No browser, no system dependencies.

Installation

pip install ironpress

Quick Start

import ironpress

# Simple conversion
pdf = ironpress.html_to_pdf("<h1>Hello World</h1><p>Generated with ironpress.</p>")
with open("output.pdf", "wb") as f:
    f.write(pdf)

# Markdown
pdf = ironpress.markdown_to_pdf("# Hello\n\nGenerated from **Markdown**.")

# Advanced options
converter = ironpress.HtmlConverter()
converter.page_size("Letter")
converter.landscape(True)
converter.margin(36.0)  # 0.5 inch margins
pdf = converter.convert("<h1>Landscape PDF</h1>")

API

html_to_pdf(html: str) -> bytes

Convert an HTML string to PDF bytes.

markdown_to_pdf(markdown: str) -> bytes

Convert a Markdown string to PDF bytes.

HtmlConverter

Configurable converter with options:

  • page_size(name)"A4", "Letter", or "Legal"
  • landscape(enabled) — landscape orientation
  • margin(points) — uniform margin in points (72 points = 1 inch)
  • convert(html) → PDF bytes
  • convert_markdown(markdown) → PDF bytes

Performance

  • 10-100x faster than browser-based solutions (Puppeteer, Playwright)
  • ~5MB binary, no runtime dependencies
  • Instant startup, no browser process

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ironpress-1.5.0.tar.gz (6.9 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ironpress-1.5.0-cp312-cp312-win_amd64.whl (10.1 MB view details)

Uploaded CPython 3.12Windows x86-64

ironpress-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ironpress-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

ironpress-1.5.0-cp312-cp312-macosx_11_0_arm64.whl (10.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ironpress-1.5.0-cp312-cp312-macosx_10_12_x86_64.whl (10.3 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file ironpress-1.5.0.tar.gz.

File metadata

  • Download URL: ironpress-1.5.0.tar.gz
  • Upload date:
  • Size: 6.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for ironpress-1.5.0.tar.gz
Algorithm Hash digest
SHA256 7d882826e0d1a856446849c93c0e473be53c3d5c5b7f20b1c87313d646625623
MD5 8fbdd19d99330d8692fa360ff7a9d499
BLAKE2b-256 08abd9d16823a14b3d40c8af629a1d376b7d504cfc5c86674e067621b517ca3d

See more details on using hashes here.

File details

Details for the file ironpress-1.5.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ironpress-1.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7820a66393e9e892852b8c0e668b23e97be9c2189d1ea0037a60e2cd1a6d90e5
MD5 a9507f9a36b7a04559767c55d83f03e5
BLAKE2b-256 053dd300c63a83498ee0c7e2c225b4a20a7f8400ced8cabe2b5b2a927a96fb9c

See more details on using hashes here.

File details

Details for the file ironpress-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ironpress-1.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab80ff28bfda96da3c0d8b141ced02fabf8ae44689069bfcfb555e1350e05562
MD5 06dc60fd38cb81c95f0b3e6383fb0d25
BLAKE2b-256 b0a436d8208a101f0fb1876723a3b8182d14fdf0b5fe82ef68c23a35f3f2aa2d

See more details on using hashes here.

File details

Details for the file ironpress-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ironpress-1.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 15002420e017907ed8f93fe3f5c8e36ef4b8cc03388c1888eac328798eeb5b3e
MD5 edb2f92c98f29c53ade8b74d641af632
BLAKE2b-256 a1c31ac9089d3c5bfa87b451e2e07ea0430b46214a81609c47b600e3d424de71

See more details on using hashes here.

File details

Details for the file ironpress-1.5.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ironpress-1.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a94f4aea78e7371b8e18e4b22ab389c48b877d9fe260cccf6c90e0fc02dfb9d1
MD5 4138571a5acf98f3b651a56541d0a7b2
BLAKE2b-256 ad76ad488673853d35b09951347701d861279ca1473fdec80101801b1a4c7bf0

See more details on using hashes here.

File details

Details for the file ironpress-1.5.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ironpress-1.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5fe3da54e35eaac200bdcc4e03b4ddd79975ae302cc2398d65cbba7b73f4144d
MD5 d7c095ff011cc563117c3449a9a2d038
BLAKE2b-256 a5ad170acd3b45f1cd746964c219a3521b1b584f6bc6b43ba5307858629bd03c

See more details on using hashes here.

Release history Release notifications | RSS feed

1.6.0

6 files

1.5.4

6 files

1.5.3

6 files

1.5.2

6 files

1.5.1

6 files

This release

1.5.0 This release

6 files

1.4.4

6 files

1.4.3

6 files

1.4.2

6 files

1.4.1

6 files

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