HTML to PDF for .NET. Chromium precision.

Generate pixel-perfect PDFs from any URL or HTML in C# — headers, watermarks, encryption and more, in a few lines of code. Powered by a managed Chromium browser pool for maximum fidelity and speed — one fluent API, one license.

dotnet add package CobaltPdf
.NET 8, 9 & 10 ready
Chromium bundled — no installs
Unlimited free evaluation*

* Free evaluation mode runs without a license key for as long as you need. Output is watermarked until a license is activated.

Program.cs
using CobaltPdf;

// Render a URL to PDF
await new CobaltEngine()
    .RenderUrlAsPdfAsync("https://example.com")
    .SaveAsAsync("website.pdf");

// Render an HTML string to PDF
await new CobaltEngine()
    .RenderHtmlAsPdfAsync("<h1>Hello, World!</h1>")
    .SaveAsAsync("hello.pdf");

// Render a local HTML file to PDF
await new CobaltEngine()
    .RenderHtmlFileAsPdfAsync("invoice.html")
    .SaveAsAsync("invoice.pdf");
Idle memory (RSS)*
~240 MB
Warm render time*
~0.9 s
Install
dotnet add package CobaltPdf
* Warm-render benchmark.
Built on proven technology
Chromium
.NET 8+
NuGet
ASP.NET Core
Docker / Linux
Azure / AWS
100%
Chromium rendering fidelity
0
System installs — Chromium bundled
1
Fluent C# API & license
Concurrent renders supported
Developer Experience

A fluent API that
reads like prose.

Every option chains. Every method has a sensible default. No XML config, no boilerplate, no ceremony — just clean, readable code that renders exactly what you mean, in either library.

Program.cs
var pdf = await new CobaltEngine()
    .WithPaperFormat("A4")
    .WithMargins(new MarginOptions(15, MarginUnit.Millimeters))
    .WithHeader("<b>Q3 Report</b>")
    .WithFooter("Page <span class='pageNumber'/>")
    .WithEncryption(new PdfEncryptionOptions { UserPassword = "user123", OwnerPassword = "owner456" })
    .WithMetadata(m => {
        m.Title  = "Q3 Financial Report";
        m.Author = "Finance Team";
    })
    .RenderUrlAsPdfAsync(reportUrl);

await blobStorage.UploadAsync(pdf.BinaryData);
Performance

No cold-start.
Just fast.

Spawning a new browser process for every PDF is expensive — often costing over a second before rendering even begins. Both CobaltPDF libraries keep a pool of warm renderer instances ready to go, so every request skips the cold-start tax entirely.

  • Configurable pool with min/max renderer count
  • Renderers recycled after N renders — no memory leaks
  • Thread-safe: concurrent renders from one instance
  • Optional PreWarmAsync() to eliminate first-request latency
The per-request lifecycle
Naive (new browser per request)
Browser startup & teardown
Render
CobaltPDF (pooled, warm) No startup cost
Render
How we compare

Why developers choose CobaltPDF

A side-by-side look at what matters in production.

Feature CobaltPDF PuppeteerSharp wkhtmltopdf iTextSharp
Modern CSS support
Modern, maintained Chromium engine
Browser pool (no cold-start)
Fluent .NET API Partial Partial
Engine bundled via NuGet
Cookie & auth injection Limited
PDF encryption (AES-256) Limited
Split, extract & merge pages
Cloud environment presets
Microservice support
Actively maintained ✗ archived

Start rendering PDFs
in minutes.

CobaltPDF runs free, unlimited, in evaluation mode — watermarked output until you activate your key.