Skip to content
Apurbo Islam

Disclaimer: Built entirely by Claude, an AI coding agent.

rustypdf

HTTP service that renders Typst templates into PDF/A-3b from JSON. Written in Rust.

Language
Rust

What it does

POST JSON to /render/{template} and get a PDF back. Each folder with a main.typ is a template, with an optional JSON Schema for the request body.

Bangla and English each get their own font, even inside one line. Ships with bilingual invoice templates, Docker, API keys, Prometheus metrics and hot reload.

Why I built it

Generating business documents with a headless browser is slow and heavy. Typst gives precise layout and good typography, and a small Rust service keeps PDF generation fast and easy to deploy.

Install and use

install
git clone https://github.com/apurboislam/rustypdf.git
cd rustypdf
cargo run            # serves templates/ on :8080
usage · sh
curl -X POST localhost:8080/render/hello \
  -H 'Content-Type: application/json' \
  -d '{"name": "রহিম", "message": "Hello from rustypdf"}' -o hello.pdf

Live demo: not shipped yet

A browser demo of rustypdf will live here. For now, see the repository.