Developer tools · New

HTML to PDF in pure C#.
No browser. No dependencies. No drama.

Bhowra.Ink is a complete HTML-to-PDF rendering engine in a single managed .NET assembly, ~895 KB with global fonts baked in. No Chromium, no Node.js, no native binaries, no third-party packages — one DLL that turns your HTML and CSS into production-quality PDFs anywhere .NET 8 runs.

Get started

Three lines to your first PDF

Install from NuGet, call one method. No configuration required.

// dotnet add package Bhowra.Ink
using Bhowra.Ink;

string html = "<h1>Invoice #1024</h1><p>Total due: <b>£1,240.00</b></p>";
byte[] pdf = HtmlConverter.ConvertToBytes(html);
File.WriteAllBytes("invoice.pdf", pdf);
With options — BaseUri, title, page count…
using Bhowra.Ink;

var result = HtmlConverter.Convert(html, new ConverterProperties
{
    BaseUri = "C:/site/assets",   // resolve <img>/<link> relative paths
    Title   = "Invoice 1024",
});

if (result.Success)
    result.SaveToFile("invoice.pdf");   // result.PageCount, result.SizeBytes also available

Try it live

Paste HTML, get a PDF — in your browser

A free online HTML to PDF converter, right in your browser — edit the HTML on the left and hit Render PDF. Converted by the pure-C# engine; no install, no sign-up.

Load an example:
Your HTML
PDF preview
Your rendered PDF will appear here.
or press Ctrl / ⌘ + Enter

Rendered server-side by the ~895 KB pure-C# library on Azure Functions. Remote images are blocked for safety — inline them as data: URIs.

~895 KB
Single DLL With Arabic, Hebrew, Devanagari, Thai fonts — no native binaries, no sidecar processes
0
Third-party dependencies No PackageReference in the .csproj at all
~50 ms
Per styled invoice Warm path; ~1 s cold start (first call, incl. JIT)
1,000+
Automated tests Including byte-identity golden files

Stop deploying a 300 MB browser to print an invoice

Most .NET HTML-to-PDF solutions are a headless Chrome wrapper in disguise. That means shipping a full browser with every deployment: hundreds of megabytes of binaries, multi-second cold starts, half a gigabyte of RAM per render, and a browser security patch cycle that is now your patch cycle. And on serverless platforms it often simply doesn't work — headless Chromium is famously blocked on the Azure Functions and Azure App Service sandbox on Windows Consumption plans.

The traditional alternative — heavyweight PDF suites — brings its own friction: multi-package dependency trees, large assemblies, and restrictive or per-everything licensing.

Bhowra.Ink takes a third path: a from-scratch HTML5 parser, CSS engine, layout engine and PDF writer, written entirely in C# against the .NET 8 base class library. The library is the renderer.

Why Bhowra.Ink

Key advantages

Built for Azure Functions

Runs where browser-based converters can't — Windows Consumption plans, sandboxed App Service, AWS Lambda, and locked-down containers. 100% managed code with no P/Invoke, GDI, or native binaries. Activate via the BHOWRA_LICENSE_KEY app setting on Azure — no sidecar process, nothing to install.

Zero dependencies, no AGPL trap

One ~895 KB managed assembly, global fonts included — zero NuGet dependencies in the .csproj. No transitive packages to audit, no version conflicts to resolve, and no AGPL licensing that forces your application code open. One package, one license, no surprises.

Deterministic, byte-identical output

Identical HTML always produces the identical PDF binary — across runs, machines, and .NET versions. Cache by input hash, verify documents by comparing checksums, and write golden-file tests that actually catch regressions. No browser version drift, no sub-pixel rendering surprises.

Global scripts — Arabic, Hebrew, Devanagari, Thai

Full bidirectional text layout for Arabic and Hebrew is bundled — no extra packages, no manual font wiring. Verified on ZATCA tax invoices and UAE/Saudi payslips. Latin, Devanagari, and Thai fonts are embedded, covering South Asia and Southeast Asia markets with zero setup.

Compliance-grade — PDF/A-2B, PDF/UA, AES-256

Generate archival PDF/A-2B for regulatory retention, tagged PDF/UA for accessibility mandates, and AES-256 encrypted PDFs with owner and user passwords — all from a single assembly. XMP metadata and modern cross-reference streams keep every document standards-compliant across PDF 1.4 through 2.0.

How it compares

Bhowra.Ink Chromium-based converters Traditional PDF suites
Deployment size ~895 KB, one DLL Hundreds of MB (full browser) Tens of MB, multiple packages
Third-party dependencies None (no AGPL) Browser + driver + Node or native libs Multi-package dependency trees, often AGPL-licensed
Azure Functions (Windows Consumption) ✅ Works ❌ Blocked by sandbox ⚠️ Varies
Cold start ~1 s (first call, incl. JIT) Seconds (browser spawn) Varies
Memory per conversion Tens of MB ~0.5–1 GB per browser instance Varies
Deterministic output ✅ Byte-identical ❌ Varies by browser version ⚠️ Varies
Security patching One small managed DLL An entire browser's CVE stream Vendor cadence
JavaScript execution ❌ By design (see FAQ) ⚠️ Varies

E-invoicing

Built for e-invoicing

Generate the human-readable invoice PDF that modern e-invoicing mandates require — with the structured XML embedded and a scannable QR code, all in pure C#.

PDF/A-3 hybrid

Archival PDF with your CII / UBL XML embedded (/AFRelationship), the form ZATCA requires when sharing an invoice with the buyer.

EU Factur-X / ZUGFeRD

Embed factur-x.xml at the right conformance profile. The PDF is the legal invoice — compliant with EN 16931 and XRechnung.

Zero-dependency QR

ISO/IEC 18004 QR generator (byte mode, versions 1–40, EC L/M/Q/H) built in — no extra library needed for the ZATCA TLV QR or any other QR-coded document.

Right-to-left & Arabic

Production-grade shaping and bidi layout for bilingual GCC invoices. Verified on ZATCA tax invoices and UAE/Saudi payslips — no extra packages required.

Bhowra.Ink renders the invoice PDF and embeds your XML. Signing and tax-authority submission remain your pipeline’s responsibility.

Feature checklist

HTML5

Spec-correct parser with the real error-recovery algorithms (adoption agency, foster parenting), the HTML5 named-entity table, <template> handling, optional-end-tag rules, tables with rowspan/colspan, lists, semantic elements.

Typography

TrueType, OpenType, WOFF and WOFF2 font embedding; automatic subsetting for small files; full-Unicode Type0/CIDFontType2 embedding with ToUnicode maps so text in the PDF copies, searches and extracts correctly.

Layout

CSS Grid with a unified track engine — fr/minmax()/auto tracks, align-content, spans that grow the implicit grid, and content-sized columns when no grid-template-columns is given. Flexbox with row/column direction, wrapping, and every justify-content mode including space-between/around/evenly. A design wider than the page shrinks to fit automatically (ConverterProperties.PageScaling), with links and bookmarks scaled to match.

Stylesheets

<link rel="stylesheet"> and @import are fetched and folded into the cascade in document order. Local files by default; remote fetches are opt-in and SSRF-guarded — private/link-local/ cloud-metadata addresses blocked, redirects re-validated, per-file and total byte caps, import-cycle and depth guards.

Images

JPEG (grayscale/RGB/CMYK with Exif), PNG (every bit depth, interlacing, full alpha), WebP (lossless / VP8L), GIF, BMP, inline SVG shapes and strokes, EXIF auto-orientation, parallel async downloads, and a pluggable ImageFetcher delegate for private blob storage. TIFF and JPEG-2000 not decoded. Also available standalone: ImageToPdf turns one or more images directly into a PDF — Contain/Cover/Stretch/None fit modes, one image per page, no HTML required.

Visual fidelity

Linear, radial and conic gradients rendered as true PDF shadings (not rasterized), CSS transforms and filter: blur(), box-shadow with real Gaussian blur, per-corner border radius, per-side dashed/dotted/double borders, outlines, opacity, text-overflow: ellipsis, word-break/overflow-wrap, ::before/::after with content counters, SVG clipPath / <use> / <symbol>.

Print & paging

@page size/margins/margin-boxes, page counters, named page sizes (A4/Letter/Legal/landscape), headers/footers in HTML styled by your document's own CSS, widows/orphans, break-inside: avoid, repeating table headers. Note: border-collapse: collapse shared-border dedup is not yet optimized.

Color

sRGB, device-cmyk() for print workflows, embedded sRGB ICC output intent for PDF/A.

PDF output

Versions 1.4–2.0, classic and cross-reference-stream xref, Flate compression (50–75% smaller files), document metadata + XMP, encryption (AES-256 and legacy RC4), watermarks, bookmarks/outline, link annotations, embedded file attachments, tagged structure trees for accessibility, PDF/A-2B and PDF/UA-1 modes. Fillable AcroForm fields (radio, checkbox, text, dropdown) generated from HTML inputs.

Simple, self-serve pricing

Per-developer annual subscription. Unlimited deployments on every tier. 7-day full-featured free trial — no sales call required.

Indie

Solo developers & freelancers

$ 349 /year
  • 1 developer
  • Unlimited servers, containers & serverless deployments
  • Every feature — nothing gated
  • All updates while subscribed
  • Email support
Get on NuGet

Site

One organization, unlimited developers

$ 3,499 /year
  • Unlimited developers in one organization
  • Everything in Team
  • Priority support
Get on NuGet

OEM

Redistribute inside your own software

from $9,999 /year
  • Royalty-free redistribution
  • Everything in Site
  • Custom terms via sales
Talk to sales
Need a perpetual license? We offer perpetual licensing on request — write to sales@bhowra.com.

What it doesn't do (yet)

These are honest gaps, not deal-breakers — but worth calling out upfront:

Persian/Urdu cursive
Extended-letter joining in roadmap; Arabic/Hebrew fully supported.
CJK text
Bring your own CJK font; Latin, Arabic, Hebrew, Devanagari, Thai included.
JavaScript / SPAs
Renders static HTML+CSS by design. Pre-render SPAs to HTML first.
Remote @font-face URLs
Fonts must be embedded in HTML; design-system CDN fonts won't load.
TIFF & JPEG-2000
PNG, JPEG, WebP lossless, GIF, BMP supported; lossy/animated WebP not decoded.
border-collapse dedup
Shared borders in collapsed tables render twice; CSS workarounds exist.

Frequently asked

Does it execute JavaScript?

No — by design. Bhowra.Ink renders static HTML + CSS, which is what server-generated documents (invoices, reports, statements, contracts) are. No script engine also means no script attack surface: untrusted HTML can't execute anything. If you need to render a JavaScript single-page app, pre-render it to HTML first or use a browser-based tool.

What platforms does it run on?

Anything that runs .NET 8 or later: Windows, Linux, macOS, Azure Functions and App Service (including Windows Consumption plans), AWS Lambda, Docker/Kubernetes. There is no native code, so there are no per-platform builds.

How is it licensed?

Per-developer annual subscription with unlimited deployments. Activate with a single key — BhowraHtmlConverter.Initialize(key) at startup, or just set the BHOWRA_LICENSE_KEY app setting on Azure. Without a key the library runs in trial mode: fully functional for 7 days, watermarked, single-page output. Perpetual licenses are available on request — write to sales@bhowra.com.

How do I know the output is correct?

The engine ships with 1,000+ automated tests including byte-identity golden files, and the optional ValidateContent flag re-reads the generated PDF after every conversion and verifies every visible word of your HTML is present and readable — catching white-on-white text, clipped sections, or dropped content automatically.

Is my data safe?

Conversion happens entirely in your process. Nothing about your documents is sent anywhere. The only outbound calls the library ever makes are the image URLs in your HTML (overridable via ImageFetcher) and license activation.

How does it compare to traditional .NET PDF libraries?

Bhowra.Ink is a single ~895 KB managed DLL with global fonts embedded, zero dependencies, a real CSS engine, and PDF/A-2B and PDF/UA output. Unlike heavyweight PDF suites, there's no multi-package dependency tree, no per-feature licensing, and no AGPL entanglement — and it runs on Azure Functions where browser-based converters can't.

One DLL. Every PDF.

Add Bhowra.Ink to your project, convert your first document in under a minute, and ship it to production on the smallest serverless plan you can find.

dotnet add package Bhowra.Ink → See pricing