Documentation & Reference (v1.5.0)
Oxtail 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 (oxtail-html-to-pdf), and a 15 MB standalone CLI binary.
30-Day Evaluation & Release Archives
Download SHA-256-verified Linux x86_64 & ARM64 binaries and cross-platform WebAssembly archives directly on /downloads/, or install via our package registries below. Need macOS or Windows native builds? Email sales@oxtailpdf.com.
1. Install & Integrate by Language
Supported Targets & Package Registries
Every native release ships both Linux x86_64 and Linux ARM64 (aarch64) across every registry and package manager automatically, while the WebAssembly package runs identically on macOS, Windows, Linux, Node.js, Deno, Bun, Workers, and Browsers.
| Ecosystem | Targets Shipped | Registries / Channels |
|---|---|---|
CLI (html-to-pdf) | linux-x86_64, linux-arm64 | install.sh, Homebrew (oxbloom/tap), Arch AUR, Direct Downloads, GitLab Releases |
JS / Wasm (oxtail-html-to-pdf) | Universal wasm32 (all OS & CPUs) | Oxbloom Registry, oxtailpdf.com/npm, Direct Downloads |
Python (oxtail-html-to-pdf) | manylinux_2_28_x86_64, manylinux_2_28_aarch64 | PyPI, Oxbloom Registry, oxtailpdf.com/pypi/ |
.NET 8 (Oxtail.HtmlToPdf) | linux-x64, linux-arm64 (single multi-RID .nupkg) | Oxbloom Registry, oxtailpdf.com/nuget/v3/index.json |
Java 17+ (com.oxtailpdf:html-to-pdf) | linux-x86_64, linux-aarch64 (single fat JAR + JNI) | Oxbloom Registry, oxtailpdf.com/maven |
Ruby 3.1+ (oxtail_html_to_pdf) | x86_64-linux, aarch64-linux | RubyGems, Oxbloom Registry, oxtailpdf.com/gems/ |
| Rust / Go / C / C++ | linux-x86_64, linux-arm64 (libhtml_to_pdf.so) | Oxbloom Registry, oxtailpdf.com/cargo/, go get oxtailpdf.com/htmltopdf, Direct Downloads |
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 standard CSS @media rules under print or screen mode (Oxtail’s @media pdf-render always matches). |
--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. |
PDF-Only CSS: @media pdf-render & pdf-visibility
Keep your normal browser screen and @media print stylesheets completely untouched while applying styles that run only when Oxtail renders a PDF. Standard browsers ignore @media pdf-render (per CSS Media Queries Level 4), while Oxtail always evaluates pdf-render to true in both --media print and --media screen modes—including <style media="pdf-render"> and <link rel="stylesheet" media="pdf-render">.
/* Ignored by Chrome/Safari/Firefox; always active inside Oxtail */
@media pdf-render {
@page {
size: A4;
margin: 16mm 14mm;
}
/* Hide web-only navigation, sticky toolbars, or interactive controls */
.web-nav,
.download-pdf-btn {
display: none;
}
/* Show PDF-only footers, signature blocks, or watermarks */
.pdf-signature-block {
display: block;
break-inside: avoid;
}
}
/* Render-time visibility override (values: visible | hidden | none; inherited) */
.interactive-widget {
pdf-visibility: none; /* omitted from PDF layout; visible in browsers */
}
.draft-stamp {
pdf-visibility: visible;
}
@media pdf-render vs @media print
Use standard @media print for shared browser print styles, and layer @media pdf-render (or pdf-visibility: none | hidden | visible) when you want exact PDF-only pagination, headers, or UI suppression without changing what users see when hitting Ctrl+P in a browser.
3. Images, Logos & Multi-Weight Fonts
Oxtail 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.5.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); Oxtail 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@oxtailpdf.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.