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.1.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.1-cp312-cp312-win_amd64.whl (10.2 MB view details)

Uploaded CPython 3.12Windows x86-64

ironpress-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ironpress-1.5.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (10.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

ironpress-1.5.1-cp312-cp312-macosx_10_12_x86_64.whl (10.4 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: ironpress-1.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 328089b90551d0eefd7ab0184f73a35bb84af72965b3c6dade9f5154ba96521d
MD5 4f4bf9e0d7758d81db77def0abe53d5d
BLAKE2b-256 f2f901bef9277d960e5c0f26c3876a7e607ad82f86e9258e3613e0894302027f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8df49bb8815355dcf91356e059af3e77cf4f15291d97fa537e2a92778e69f12a
MD5 39c105fba12ff19b1af52e6f4eef4da3
BLAKE2b-256 3f1f6bdd814a6efb9ae6b6b741db30ab607f5bbed70ff040853c6db1b2d1a3c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 77ed3a52510e5aa6e5995e62870d0596afa66b163b506794994be71770c871a2
MD5 6d4520a1faaa8479ceb66ab0b259da24
BLAKE2b-256 7bb02374c45044948b8ddd2924f61fea876472b3a2c276fafb309105c5fa652a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9e11db0b6d7058d6802e1d89d30d8567a6e6e2899dc6e7cdba2ca2a278625e0f
MD5 8daab294556c2c574e7ecdeeb1867d29
BLAKE2b-256 3041ab4e34f6fc4ed600d86996471231ec4fbf8a2250b3f225f157b8d1eec4d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f7542886f996479996018218362bb8d691f777a2724cf2d80b0ac222e9c3d78
MD5 06628d16eb3504c2d23b0859f6764f11
BLAKE2b-256 99a5ca87456e34c587c35aee7e325bec78e134a0cb03c60990b2670fddc2e510

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e0fc63cf425d419f4bfb6747012d2234c4c2e9f539b9f5bac2151c609e0bfdf1
MD5 30d6264e113f244634befefef28c8737
BLAKE2b-256 c44150080c05e8849f191b9aacb0b353420b03df16dd09c105aec07b1562ab8e

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

This release

1.5.1 This release

6 files

1.5.0

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