CobaltPDF.WebKit
1.5.0
Prefix Reserved
dotnet add package CobaltPDF.WebKit --version 1.5.0
NuGet\Install-Package CobaltPDF.WebKit -Version 1.5.0
<PackageReference Include="CobaltPDF.WebKit" Version="1.5.0" />
<PackageVersion Include="CobaltPDF.WebKit" Version="1.5.0" />
<PackageReference Include="CobaltPDF.WebKit" />
paket add CobaltPDF.WebKit --version 1.5.0
#r "nuget: CobaltPDF.WebKit, 1.5.0"
#:package CobaltPDF.WebKit@1.5.0
#addin nuget:?package=CobaltPDF.WebKit&version=1.5.0
#tool nuget:?package=CobaltPDF.WebKit&version=1.5.0
CobaltPDF.WebKit
WebKit-based HTML → PDF for .NET — the low-memory, Linux-native sibling of
CobaltPDF. Same fluent API, same CobaltEngine, one license key
for both engines.
- Up to 96% lower idle memory and 57% faster warm renders than the Chromium edition
- Deploys on stock Azure Linux plans — zip-deploy to App Service or Azure Functions,
no Docker, no
apt install, no custom containers (validated on real Azure infrastructure) - ~3 MB deployment artifact — the self-contained render engine (~262 MB) downloads once per instance at first start, SHA-256-verified, and is cached from then on
dotnet add package CobaltPDF.WebKit
using CobaltPdf.WebKit; // the only line that differs from CobaltPDF
var pdf = await new CobaltEngine()
.WithPaperFormat("A4")
.RenderUrlAsPdfAsync("https://example.com");
await pdf.SaveAsAsync("out.pdf");
Migrating an existing CobaltPDF (Chromium) project is a one-line change: swap
using CobaltPdf; for using CobaltPdf.WebKit; and recompile — watermarks, encryption,
headers/footers, wait strategies, cookies, custom JS, page splitting and the rest of the
fluent API work identically.
Benchmark vs the Chromium edition
10 warm renders across example.com, wikipedia.org/Portable_Document_Format, and
news.ycombinator.com; steady RSS sampled after each render returned, full subprocess
tree included.
| Metric | CobaltPDF (Chromium) | CobaltPDF.WebKit | Δ |
|---|---|---|---|
| Warm-mean render time | 5,747 ms | 2,456 ms | 57% faster |
| Steady cold RSS | 294 MB | 14 MB | 95% less memory |
| Steady warm-mean RSS | 310 MB | 14 MB | 95% less memory |
| Steady warm-max RSS | 315 MB | 14 MB | 96% less memory |
On memory-capped hosts (Azure B-series, small containers) that headroom is the difference between "works reliably" and "OOM-killed on image-heavy pages".
Runs everywhere — one NuGet, backend picked automatically
| Host | Backend |
|---|---|
| Linux x64 (Azure App Service / Functions, ACA, AKS, ECS, any glibc ≥ 2.35 container or VM) | Inline, native — self-contained bundle, zero system packages |
| Windows with WSL 2 (default for development) | WSL — bundle installs into your distro, near-native speed |
| Windows / macOS with Docker | Docker — public multi-arch dev image, pulled automatically |
| Windows / macOS, opt-in | Stub — placeholder PDFs for testing controllers offline |
The WSL / Docker / stub switches are development conveniences: on Linux they are ignored and rendering is always native in-process, so dev configuration ships to production unchanged.
Currently published for
linux-x64glibc hosts (Ubuntu 22.04+/24.04, Debian 12+, Fedora 39+ and equivalent container images). Alpine (musl) and arm64 are on the roadmap.
Azure in three commands
// Program.cs
CobaltEngine.SetLicense(Environment.GetEnvironmentVariable("COBALTPDF_LICENSE")!);
CobaltEngine.Configure(o => { o.MinSize = 1; o.MaxSize = 1; });
_ = Task.Run(() => CobaltEngine.PreWarmAsync()); // bundle download off the request path
az functionapp config appsettings set -n <APP> -g <RG> --settings \
COBALT_BUNDLE_CACHE_DIR=/tmp/cobaltbundle COBALTPDF_LICENSE="<KEY>"
dotnet publish -c Release -o ./publish
func azure functionapp publish <APP>
That's a complete deployment to a stock Linux Functions plan — something a Chromium-based renderer structurally cannot do (its system libraries aren't installable there). Full walkthroughs, including App Service, Docker, ACA and AWS: Deployment guide.
Tuning highlights
CobaltEngine.Configure(o =>
{
o.MinSize = 1; // warm workers
o.MaxSize = 4; // concurrent renders (~0.5 GB each)
o.MaxUsesPerBrowser = 5; // recycle cadence — bounds steady-state memory
o.MaxMemoryMb = 2048; // clean error instead of an opaque OOM-kill
});
- Worker recycling (
MaxUsesPerBrowser) keeps long-running services at their cold-start memory baseline instead of creeping upward. WithoutPostProcessing()returns the engine's raw PDF — ~30 MB less peak memory and faster renders, at the cost of ~70% larger files (skips font subsetting / image re-encoding; watermarks, encryption and metadata are bypassed with it).- Every render reports its own telemetry:
pdf.RenderMilliseconds,pdf.PeakRssMb,pdf.SteadyRssMb— size your plan from real numbers.
Full reference: Configuration.
Air-gapped & self-hosted deployments
No outbound internet at runtime? All supported, in escalating order of control:
- Ship the bundle in your publish output — place a pre-extracted bundle at
AppContext.BaseDirectory/cobalt-webkit-bundle/; it is discovered before any download is attempted. - Point at a pre-staged bundle on disk — set
COBALT_INLINE_HOME. - Self-host the tarball —
COBALT_BUNDLE_BASE_URL+COBALT_BUNDLE_SHA256(Artifactory, S3, internal GitHub;file:///URLs work too). - Pre-bake Docker images —
ADDthe tarball into your image's cache directory; the library hash-verifies it and skips the download.
Set AutoDownloadBundle = false to hard-fail if any outbound call would occur.
Details: The Render Bundle.
Documentation
| WebKit edition docs | cobaltpdf.com/docs-webkit |
| Deployment (Azure / Docker / AWS) | Deployment guide |
| API reference | CobaltPdf.WebKit namespace |
| Chromium edition | cobaltpdf.com/docs |
| PDF microservices (shared wire model) | CobaltPDF.Requests |
License
CobaltPDF.WebKit is commercial software — © 2026 Modus Squared Ltd. It is licensed,
not sold, under the CobaltPDF Commercial License; see
LICENSE.txt in the package for the full terms and THIRD-PARTY-NOTICES.txt for the
open-source components it redistributes.
- Evaluation is free — without a license key every feature works and generated PDFs carry a trial watermark.
- One key activates both engines — CobaltPDF (Chromium) and CobaltPDF.WebKit.
- Purchase: cobaltpdf.com/pricing
CobaltEngine.SetLicense(Environment.GetEnvironmentVariable("COBALTPDF_LICENSE")!);
Support
- Documentation: cobaltpdf.com/docs-webkit
- Troubleshooting: cobaltpdf.com/troubleshooting
- Contact: via cobaltpdf.com/contact
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- CobaltPDF.Requests (>= 1.5.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- PDFsharp (>= 6.2.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.5.0 | 43 | 6/13/2026 |