Convert any web page or raw HTML string to PDF with a Chromium engine.
- HTML5/CSS3, web fonts, JavaScript
- HTTP headers, cookies, POST, auth, proxy
- Headers, footers and tables of contents with page numbers
SelectPdf.Universal is our new flagship — the SelectPdf .NET library on Windows, Linux and macOS, with the classes and members you already know. Chromium-powered HTML to PDF plus the full PDF toolkit: create, merge, sign, fill forms, extract text. It targets .NET 8, .NET 10 and .NET Standard 2.0, and it runs in Docker containers and on ARM64 too — with the engine and fonts bundled, so there is nothing to apt-get. One perpetual license covers SelectPdf.Universal and the classic Windows library.
The full library, on every platform you ship to.
Free, cross-platform. PDFs up to 5 pages.
SelectPdf.HtmlToPdf.Universal is the free Community Edition of the cross-platform converter — HTML to PDF only, free for commercial use, no watermark, capped at five pages per document. Same namespace and same classes as the full package, so moving up later is a package swap and a license key.
SelectPdf.Universal is our new flagship: cross-platform, and the first to get new features and standards. It keeps the classes, members and overloads of the classic library wherever they could be kept, so moving a project over is mostly mechanical — new packages, the SelectPdf. namespace, and the library's own drawing types in place of System.Drawing. The classic Windows library continues to be maintained and receives selected updates.
using SelectPdf.Universal;
// the same code on Windows, Linux and macOS
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl("https://selectpdf.com");
doc.Save("output.pdf");
doc.Close();
Imports SelectPdf.Universal
' the same code on Windows, Linux and macOS
Dim converter As New HtmlToPdf()
Dim doc As PdfDocument = converter.ConvertUrl("https://selectpdf.com")
doc.Save("output.pdf")
doc.Close()
Measured against the classic 26.4 SDK: 82% of its public types and members carry over unchanged apart from the namespace. Most of the rest are System.Drawing types, settings for the WebKit and Blink engines, and direct printing.
ConvertUrlAsync and ConvertHtmlStringAsync sit beside the synchronous calls — awaitable, with cancellation. PdfDocument and the managers are IDisposable, so a using statement can stand in for Close().
From the 2026-10-15 run of the open benchmark, which SelectPdf maintains: ten libraries on one machine, under Windows and Ubuntu 24.04 in WSL2. Results vary with the workload and the environment. Full results and test conditions · All ten libraries compared · SelectPdf vs IronPDF · The 14 comparison tasks on GitHub
The Chromium engine, the fallback fonts and the native PDF tools all ship inside the per-platform NuGet package, so a stock .NET runtime image is enough.
The SelectPdf.Universal.Native package for each Linux runtime carries
the complete Chromium shared-library closure — including the modules loaded at run time for HTTPS — so
there is no apt-get install step in your Dockerfile. Rendering is
headless: no X server, no Xvfb, no $DISPLAY.
A plain docker run works — no --no-sandbox,
no added capabilities, no privileged mode, no GPU and no --shm-size
tuning. No manual chmod either: publishing on Linux makes the engine
readable and executable for every user, and the library restores the execute permission itself if it was
lost, so the image can switch to the non-root app user with no extra line.
PDF to text and PDF to image need nothing at all on any platform — that engine is statically linked.
Step by step: HTML to PDF in a Docker container on Linux, a complete C# program with its Dockerfile.
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /src COPY . . RUN dotnet publish -c Release -f net10.0 -o /out FROM mcr.microsoft.com/dotnet/runtime:10.0-noble AS runtime # no apt-get: the Chromium closure ships in the engine # package (SelectPdf.Universal.Linux) and runs headless WORKDIR /app COPY --from=build /out ./ ENTRYPOINT ["dotnet", "MyApp.dll"]
New in 26.5: the conversions can run on another machine.
Set RenderingEngine. and HTML to PDF, HTML to image,
PDF to text and PDF to image run in the ghcr.io/selectpdf/engine container
instead of on the application's machine. The application then references only SelectPdf.Universal, with no
native engine package, so it runs on Alpine Linux and other musl-based images, where the native engines do not.
The engine image is published for linux/amd64 and linux/arm64, with a Helm chart, and the documentation has tested setups for Docker Compose, Kubernetes, Azure Container Apps, Amazon ECS and Google Cloud Run. The free Community Edition supports it too.
Step by step: HTML to PDF on Alpine Linux with the remote engine and the remote engine documentation.
using SelectPdf.Universal;
// convert in the SelectPdf engine container, at the address
// in the SELECTPDF_ENGINE_ENDPOINT environment variable
GlobalProperties.RenderingEngine = RenderingEngine.ChromiumRemote;
HtmlToPdf converter = new HtmlToPdf();
PdfDocument doc = converter.ConvertUrl("https://selectpdf.com");
doc.Save("output.pdf");
doc.Close();
Everything the classic SDK does, on every platform the Universal packages target.
Convert any web page or raw HTML string to PDF with a Chromium engine.
Render a page or HTML string to an image with the same engine.
Build documents in code, page by page.
Work on PDFs your application did not create.
Create, fill and flatten interactive form fields.
Read documents back out again.
Convert Word documents to PDF — no browser, no engine process, no network.
Remove sensitive content from existing PDFs — deleted from the file, not covered over.
Check the digital signatures on a PDF you received.
The compliance half of a document workflow: take out what must not leave, and check what came in.
PdfRedactionManager finds content by area, by text or by regular
expression and removes it from the file. The text, images, links and form fields underneath are deleted,
not hidden behind a box — there is nothing left to copy or extract.
PdfSecurityManager. checks every signature on a
document you received: whether it is valid and trusted, whether the document changed after it was signed
and, with revocation checking on, whether the certificate was revoked. Check a signed invoice or contract
before you act on it.
Both are part of the commercial SelectPdf.Universal package.
using SelectPdf.Universal;
using System.Text.RegularExpressions;
var redactor = new PdfRedactionManager();
redactor.Load("statement.pdf");
// every card number, wherever it appears
redactor.AddRedaction(new Regex(@"\d{4}-\d{4}-\d{4}"));
redactor.OverlayText = "REDACTED";
redactor.Redact();
redactor.Save("statement-redacted.pdf");
redactor.Close();
More in the .NET library docs — the rest is one email away.