Metadata-Version: 2.4
Name: typepress
Version: 0.3.0
Summary: Pure Rust HTML/CSS → PDF engine — Python binding
Project-URL: Homepage, https://github.com/alitrack/typepress
Project-URL: Repository, https://github.com/alitrack/typepress
Author: TypePress Contributors
License-Expression: MIT
Keywords: html-to-pdf,pdf,rust,typesetting
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Printing
Classifier: Topic :: Text Processing
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# TypePress — Python

Pure Rust HTML/CSS → PDF engine. No browser required.

```python
from typepress import TypePress

tp = TypePress()

# HTML → PDF
tp.html_to_pdf("report.html", "report.pdf")

# With options
tp.html_to_pdf(
    "report.html",
    "report.pdf",
    size="A3",
    landscape=True,
    margin="10mm",
)

# Markdown → PDF
tp.md_to_pdf("report.md", "report.pdf")

# HTML → PNG (via pymupdf fallback)
tp.html_to_png("report.html", "report.png")

# Full API
tp.convert(
    input="report.html",
    output="report.pdf",
    format="pdf",       # pdf | svg | png
    size="A4",
    landscape=False,
    margin="20mm",
    scale=2.0,          # PNG scale factor
)
```

## Install

```bash
pip install typepress
```

The package auto-downloads the `typepress` binary for your platform on first use.

## Requirements

- Python 3.8+
- Linux x86_64, macOS arm64/x86_64, or Windows x86_64
