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

Uploaded CPython 3.12Windows x86-64

ironpress-1.5.2-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.2-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.2-cp312-cp312-macosx_11_0_arm64.whl (10.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

ironpress-1.5.2-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.2.tar.gz.

File metadata

  • Download URL: ironpress-1.5.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bd7a92dc7957a299273d41d3bcde7b57b5b91e5c18f63f7193e657a8e4228a77
MD5 40865b999941f5636ee2db244ab25122
BLAKE2b-256 129367b0c02eb09532cf2e070a8979ffbcb4164418004e0bbf566799071cba9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 10152c92844a3f5c060d1f019d613eb357b0aa55334658cf085e09fa356ddd23
MD5 85c5b498fd86ef6942ef2c06ccddf533
BLAKE2b-256 980fa2d2dcc3ab4dd0526101042ffafd66eafb355cb729e4b2a20f0ff64061ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b1f7da7b6a6663b526d4e20be3c3bb52f030528762748678a3b6e572e6213179
MD5 8228829cf145ad45ab9457c09cc18b3e
BLAKE2b-256 d2b8c35c0d1a84e1d38bb7ab512e99bf2fba50418109ca06339bcae398327a0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 521fe75296d4ec77f2254d62734a41542b9187b0be1515e7aa87cdf634916356
MD5 921230ce690a0a3d923b976d2426ba46
BLAKE2b-256 04a4c3e6bec96670dbd881c3b70058a891dbdcc664dab3df86f6b67295fbef43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eda1cef01bc7a030dc75b4a714e7b8de7ef8882b582958542538db5711f9bc71
MD5 5557c57b4e88847099b7ed2c56d27c44
BLAKE2b-256 048918ec7c39865a5e0611b71489a7abc4bd4d5459c1ca580dc57f45f0c59c33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ironpress-1.5.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b805cbce68191521eaa9efebaab75635f7a40d9c7f3c79032c95f310f9065447
MD5 c2819522af464c11684150307a5c2420
BLAKE2b-256 25856a8300c18f4219fbe315e938f1b0bc9fed17e8c48fddc1008d9f76342ed5

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

This release

1.5.2 This release

6 files

1.5.1

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