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 and footers with page numbering
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.
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. The library restores the engine's execute permission itself, which matters when the deployment
was published from Windows; a non-root image needs one extra line,
RUN chmod -R a+rX over the engine folder.
PDF to text and PDF to image need nothing at all on any platform — that engine is statically linked.
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 # SelectPdf.Universal.Native.linux-x64 and CEF runs headless WORKDIR /app COPY --from=build /out ./ ENTRYPOINT ["dotnet", "MyApp.dll"]
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.
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.