Documentation & Reference (v1.0.0)
Ironhide compiles HTML5 & CSS directly into deterministic PDF 1.7 bytes—in-process with explicit fonts, explicit assets, and bounded memory limits. Distributed as closed-source prebuilt C ABI v1 libraries (libhtml_to_pdf), WebAssembly (@ironhide/html-to-pdf), and a 15 MB standalone CLI binary.
30-Day Evaluation & Release Archives
Test your HTML/CSS immediately in the Live WebAssembly Playground, or run an internal 30-day evaluation under the Personal License. Need prebuilt release archives (Linux, macOS, Windows) ahead of public registry mirrors? Email sales@ironhidepdf.com.
1. Install & Integrate by Language
2. CLI Reference (html-to-pdf)
Usage: html-to-pdf [OPTIONS] <input.html>
| Flag | Default | Description |
|---|---|---|
-o, --output FILE | <input>.pdf | Write rendered PDF bytes to FILE. |
--paper a3|a4|a5|letter|legal | a4 | Default physical page size (CSS @page { size } overrides when declared). |
--margin LENGTH | 0.7in | Page margins as a CSS length (mm, in, or pt). |
--media print|screen | print | Evaluate CSS @media rules under print or screen media mode. |
--print-backgrounds | off | Paint background colors and images in print mode. |
--tagged | off | Emit PDF 1.7 structure tree tags for accessible reading order. |
--document-outline | off | Generate PDF bookmark outline entries from h1–h6 headings. |
--js | off | Execute bounded document scripts (disabled by default for untrusted HTML). |
--font-dir DIR | none | Explicit ordered directory of .ttf/.otf fonts (no ambient OS font scan). |
--resource-dir DIR | none | Local asset directory for images/stylesheets (default-deny path traversal). |
--trusted-root DIR | none | Web-root directory serving all referenced local resource kinds. |
--base-url URL | https://localhost/... | Canonical base URL for resolving relative links and resources. |
--list-pages | off | Print N pages to stdout without writing a PDF file. |
3. Images, Logos & Multi-Weight Fonts
Ironhide never makes outbound HTTP requests or reads host fonts automatically. In everyday SDK code, pass fonts directly through the high-level APIs (renderPdf in JS, render_pdf in Python/Rust, Render in Go/.NET, render in Ruby/Java/C++). For custom images, external stylesheets, strict page/memory limits, or raw C ABI calls, supply assets via inline <svg> / data: URIs or the low-level h2p-ffi-request/1 envelope:
{
"schema": "h2p-ffi-request/1",
"document_utf8": "<!doctype html><img src=\"https://app.local/logo.png\" width=\"120\"><h1>Invoice</h1>",
"environment": {
"paper_width_milli_points": 595440,
"paper_height_milli_points": 841680,
"media_type": "print",
"print_backgrounds": true,
"tagging_mode": "tagged",
"document_outline": true
},
"limits": { "max_pages": 250, "max_document_bytes": 10485760 },
"resources": [
{ "url": "https://app.local/logo.png", "kind": "image", "mime_type": "image/png", "requirement": "required", "data_base64": "..." },
{ "url": "https://app.local/Inter-Regular.ttf", "kind": "font", "mime_type": "font/ttf", "requirement": "required", "data_base64": "..." },
{ "url": "https://app.local/Inter-Bold.ttf", "kind": "font", "mime_type": "font/ttf", "requirement": "required", "data_base64": "..." }
],
"font_faces": [
{ "resource_url": "https://app.local/Inter-Regular.ttf", "family": "Inter", "style": "normal", "weight": 400, "generic_families": ["sans-serif"] },
{ "resource_url": "https://app.local/Inter-Bold.ttf", "family": "Inter", "style": "normal", "weight": 700, "generic_families": ["sans-serif"] }
]
}
Paper size units: paper_width_milli_points / paper_height_milli_points use thousandths of a PDF point (1/72 in): A4 is 595440 × 841680; US Letter is 612000 × 792000. You can also set physical size directly in CSS with @page { size: A4; margin: 14mm; }.
Streaming sessions: Beyond one-shot render_preloaded, the C ABI v1 exposes a resumable session state machine (create → step → supply / drain → finish / free) so hosts can stream large outputs with backpressure, supply resources on demand, and cancel renders cleanly.
4. Supported Capabilities & Honest Boundaries
| Area | Current Status (v1.0.0) |
|---|---|
| HTML & Modern CSS | HTML5 parsing, CSS cascade/layers/custom properties/calc()/logical properties, CSS Grid, Flexbox, floats, multi-page tables, transforms, gradients, clip-path, @page sizes, margin boxes & page counters. |
| Graphics & Images | Inline SVG, PNG, JPEG, and raster/vector paint emitted directly as real PDF vector paths, images, and selectable text (never page screenshots). |
| Fonts & Typography | Explicit .ttf / .otf font shaping and subset embedding with ToUnicode CMaps for clean text copy/search. Pass every needed font weight/script explicitly. |
| JavaScript Execution | Disabled by default for safety. Bounded script execution is opt-in (--js / js_enabled: true); Ironhide is not a live interactive SPA browser or headless web scraper. |
| PDF Standards | Deterministic PDF 1.7 (sRGB) with optional structure trees (--tagged) and heading outlines (--document-outline). PDF/A archival profiles, PDF/X CMYK press output, and PDF encryption are not yet included. |
| Network & Host Isolation | Zero outbound network calls, zero ambient filesystem reads, zero OS font scanning. External Google Fonts / CDN links will not be fetched automatically—bundle assets explicitly. |
5. Security, Checksums & Release Provenance
Every official release archive ships with deterministic SHA256SUMS (with optional detached GPG signature), third-party attribution and license inventory (NOTICE.txt and SOURCES.md), and zero telemetry or phone-home behavior. To report a security issue or request vendor documentation, email security@ironhidepdf.com.
Want to test your own HTML right now?
Paste your markup into the Live WebAssembly Playground to inspect real render latency, peak memory, and PDF output directly in your browser.