# kcode-html-to-pdf
A tiny Rust wrapper that renders self-contained HTML/CSS documents to PDF bytes with [Ironpress](https://crates.io/crates/ironpress).
```rust
use kcode_html_to_pdf::{render, Font};
let pdf = render(
"<!doctype html><html><body><h1>Hello</h1></body></html>",
vec![],
)?;
# Ok::<(), kcode_html_to_pdf::RenderError>(())
```
Supply custom licensed fonts at runtime as `Font { family, ttf }`. Keep images self-contained as data URLs or inline SVG, and express page geometry and page breaks in CSS. Sanitization remains enabled; remote loading and filesystem base paths are not exposed.
See [Documentation.md](Documentation.md) for the complete contract.