HTML to PDF.
Pure .NET.
PeachPDF renders HTML, CSS, and SVG straight to vector PDF — entirely in-process. No headless browsers. No native dependencies. Anywhere .NET runs.
dotnet add package PeachPDF
Current version: v0.9.8 — release notes
Why PeachPDF
Pure .NET, in-process
No Puppeteer, wkhtmltopdf, or Ghostscript to install, babysit, or patch. HTML parsing, CSS cascade, layout, and PDF writing all run inside your process — containers, serverless, trimmed and AOT deployments included.
Native vector SVG
Inline <svg>, standalone files, data URIs, and CSS background-image sources render as real vector PDF content — crisp at any zoom, never rasterized.
Modern CSS layout
Flexbox, multi-column layout, 2D and 3D transforms, custom properties with var(), calc()/min()/max()/clamp(), and gradients with CSS Color Level 4 interpolation.
Print-grade paged media
@page rules, named pages, margin boxes, and running headers and footers — the CSS Paged Media toolkit for real documents, not screenshots of web pages.
Accessible, tagged output
Optional Tagged PDF (PDF/UA) output with a logical structure tree, automatic document language, and CSS-driven tag mapping. Metadata flows in automatically from <title> and <meta>.
Real font handling
Web fonts via @font-face, fonts loaded from a stream, system font discovery on every platform, and browser-grade weight/style/stretch matching with faux-bold and faux-italic synthesis.
See how PeachPDF compares to other .NET PDF libraries →
A few lines to a finished PDF
One package, one generator, one call. Render any HTML string to a vector PDF document and save it wherever a stream goes.
PdfGenerateConfig pdfConfig = new(){
PageSize = PageSize.Letter,
PageOrientation = PageOrientation.Portrait
};
PdfGenerator generator = new();
var document = await generator.GeneratePdf(html, pdfConfig);
document.Save(stream);Dig into the docs
Why PeachPDF?
How it compares to IronPDF, Puppeteer, wkhtmltopdf, QuestPDF, and friends — and why HTML is the right input format.
Getting Started
Install the package, render your first PDF, and get the thread-safety model right from the start.
Architecture
How HTML becomes a PDF: the parser, DOM, CSS cascade, layout engine, painting layer, and PDF renderer.
HTML & CSS Support
The full compatibility matrix of elements, properties, selectors, and at-rules — including gaps and extensions.
SVG Features
Everything supported in inline and standalone SVG, rendered as real vector PDF content.
Usage Examples
Copy-pasteable recipes: MHTML, HTTP fetching, fonts, tagged PDF output, ASP.NET Core, and Azure Functions.
Feature Showcase
Real PDFs rendered by the current release at build time, side by side with the exact HTML they came from.
API Reference
Generated reference for every public type and member, always in sync with the latest source.
Ready to render?
dotnet add package PeachPDF
Free and open source. Available on NuGet, developed on GitHub.
Need help? Free community and paid support options are available.