Why PeachPDF?
Because you already know how to build documents — you've been doing it in HTML and CSS for years. PeachPDF turns that knowledge into professional vector PDFs, entirely in-process, completely free.
I love this library. It brings me primal programming joy. I hate how bloated everything is. I want fast. I want now. I want light. I want the satisfaction of solving a hard problem with a simple solution. That feeling of lightness, when you take a huge burden or a big load off your shoulders, and you feel so, so light, like if you just reach out, you could reach the stars.
The skills you already have are the API
Most PDF libraries ask you to learn their world. PeachPDF meets you in yours.
No new API to learn
Describe your invoice, report, or contract in HTML and CSS — not in a proprietary document object model or a fluent builder API you'll only ever use for PDFs. If you can write a web page, you can already write a PeachPDF document.
No manual layout
No coordinate math, no measuring strings to see where the next line goes, no hand-rolled pagination. The layout engine handles text flow, tables, flexbox, page breaks, and running headers and footers — you say what the document is, not where every piece sits.
Design tooling you already own
Iterate on your template in a browser, keep it in version control as plain HTML, and hand it to anyone who knows the web. Designers can restyle a document without ever reading C#.
Graphics without a graphics API
Charts, logos, seals, and diagrams go in as inline or standalone <svg> and come out as true vector PDF content — crisp at any zoom, never rasterized, no drawing code required.
Bring your own templating
PeachPDF takes an HTML string, so however you already produce HTML works: Razor, Scriban, Handlebars, or plain string interpolation. No vendor template language, no proprietary document format.
Accessibility from your markup
The semantic HTML you already write — headings, lists, tables, alt text, even MathML formulas — becomes an optionally tagged, accessible PDF with a real structure tree. Tune the tagging per element with a CSS property, not a separate accessibility API.
See exactly what's supported in the HTML & CSS compatibility matrix and the SVG feature list. Would rather stay in C#? The declarative API builds documents from code on the very same layout engine, and the peachpdf command-line tool needs no .NET at all.
Standards and print production
Archival, print-shop, and accessibility requirements are usually where a free HTML-to-PDF tool runs out. They are built in here, and each is opt-in.
PDF/A for archiving
ISO 19005 parts 1, 2, and 3 at levels B, U, and A, with an sRGB output intent and XMP metadata. PDF/A-3 documents can carry file attachments, including the structured XML of a ZUGFeRD / Factur-X e-invoice. A character no font can render fails loudly instead of silently vanishing. PDF/A guide
PDF/X for print
PDF/X-1a, X-3, and X-4, with device-cmyk() colors, CMYK images kept as CMYK, and conversion to a target ICC profile for the press. PDF/X guide
PDF/UA tagging
A logical structure tree, automatic document language, and per-element control through -peachpdf-pdf-tag-type. Tagged PDF guide
PDF 2.0
Optional PDF 2.0 output. MathML formulas are tagged as Formula elements that carry their MathML source as an Associated File. PDF 2.0 guide
Bookmarks and navigation
Headings become PDF bookmarks automatically, with full CSS control. Add CSS-only tables of contents with real page numbers, and link annotations that land where they should.
Fillable forms
<input> and <select> become real AcroForm fields, styled with ordinary CSS. Forms guide
Free and open source — actually
No asterisks. No trial watermarks. No surprises at renewal time.
BSD-3-Clause licensed
One of the most permissive licenses there is. Use PeachPDF in commercial products, closed-source products, SaaS platforms — anywhere — with no obligation beyond keeping the license notice.
No license keys or fees
No per-developer seats, no per-server pricing, no revenue thresholds that flip a "community" license into an invoice once your business grows. The library is unconditionally free for everyone.
Developed in the open
Every line of source is on GitHub. Read it, audit it, debug into it, fork it. Optional paid support and sponsorship exist for teams that want them — the library never depends on either.
Runs on every supported .NET — and beyond
PeachPDF supports .NET 8 and newer, in step with Microsoft's own .NET support policy, and is ready for trimmed and AOT-compiled deployments. It also runs in the browser under WebAssembly (try the demo) and ships as a standalone command-line tool.
Read the full license and FAQ.
How PeachPDF compares
The .NET HTML-to-PDF landscape splits three ways: wrap a browser, wrap a native binary, or make you lay out the PDF in code. PeachPDF takes a fourth path — a real HTML/CSS layout engine written in managed .NET. The .NET runtime support column shows which runtimes each targets.
| Library | License & cost | HTML & CSS input | How it renders | Standards & accessibility (PDF/A, PDF/X, tagged PDF) | Native / external dependencies | .NET runtime support | Containers & serverless | Status |
|---|---|---|---|---|---|---|---|---|
| PeachPDF | Free — BSD-3-Clause | ✅ HTML, CSS, SVG, and MathML | Own layout engine, fully in-process | ✅ PDF/A parts 1–3, PDF/X-1a/3/4, and PDF 2.0; optional tagged output with a structure tree, customizable per element via CSS (-peachpdf-pdf-tag-type, including none for decorative content) |
None — pure managed .NET | ✅ .NET 8 and newer — every currently-supported .NET version | Excellent — no browser, no native binaries, works in trimmed and AOT deployments | Actively developed |
| IronPDF | Commercial — paid per developer | ✅ Chromium-grade | Embedded Chromium renderer | ✅ PDF/A (1 through 4) and PDF/UA export; PDF/X not documented; no per-element tag control | Ships Chromium native binaries with the package | .NET Framework 4.6.2+, .NET Standard 2.0, .NET Core / .NET 5–10 | Works, but images grow by hundreds of MB | Actively developed |
| PuppeteerSharp | Free — MIT | ✅ Chrome-grade | Drives a headless Chrome in a separate process | ⚠️ Chrome can emit tagged PDFs; no tag customization and no PDF/A or PDF/X option | Downloads a full Chromium build (hundreds of MB) | .NET Standard 2.0 and .NET 8+ | Hard — browser install, sandbox flags, and extra memory in every image | Actively developed |
| DinkToPdf | Free — MIT | ⚠️ 2012-era WebKit; no flexbox or modern CSS | Wraps the native libwkhtmltox library |
❌ Untagged output; no PDF/A or PDF/X options | Per-platform native library you deploy yourself | .NET Standard 2.0 / .NET Core (dormant) | Fragile — native loading issues and long-standing thread-safety problems | Dormant — no releases in years |
| wkhtmltopdf | Free — LGPL | ⚠️ 2012-era WebKit; no flexbox or modern CSS | External command-line process | ❌ Untagged output; no PDF/A or PDF/X options | Native binary installed on the host | Language-agnostic external CLI | Possible, but you're baking an archived tool into new images | Archived — deprecated by its maintainers |
| Prince (PrinceXML) | Commercial — paid per server | ✅ Excellent, best-in-class paged-media CSS | External native process | ✅ PDF/A 1–3, PDF/X-1a/3/4, and PDF/UA-1, with CSS tag customization | Native binary installed on the host | Language-agnostic external process | Works, but every container counts as a licensed server | Actively developed |
| QuestPDF | Free under $1M annual revenue, paid above | ❌ None — code-first fluent C# API | Own engine drawing through SkiaSharp | ⚠️ PDF/A-2 and -3 and PDF/UA conformance in recent versions, from code-first layouts; PDF/X not documented | SkiaSharp native binaries | .NET Framework 4.x, .NET Standard 2.0, .NET 6+ | Good, but every layout is C# code your developers maintain | Actively developed |
| PDFsharp / MigraDoc | Free — MIT | ❌ None — drawing and document object model | Direct PDF drawing; you position content | ⚠️ Tagged / PDF-UA output via UAManager in recent versions; structure marked up in code |
None | .NET Framework 4.6.2+, .NET Standard 2.0, .NET 6+ | Good, but all layout is manual | Actively developed |
| Aspose.PDF | Commercial — paid per developer | ⚠️ HTML conversion with partial CSS fidelity | Own converter inside a large general-purpose PDF suite | ✅ Tagged PDF via a programmatic tagging API; PDF/A and PDF/X by converting the finished PDF | Large closed-source library | .NET Framework, .NET Standard 2.0, .NET 6+ | Works | Actively developed |
Licensing, pricing, and standards-support details are as of this writing and change over time — always check each vendor's site before deciding.
Where PeachPDF isn't the right fit: it doesn't execute JavaScript, and pixel-perfect Chrome parity isn't the goal — if your documents are rendered by client-side scripts, a browser-based tool is the honest recommendation. A few visual effects are also outside what it draws today, including backdrop-filter and 3D perspective. For everything else, the compatibility matrix tells you exactly what you get.
Proven, not just claimed
PeachPDF is tested across Windows, Linux, and macOS, gated on test coverage for every change, and its graphics output is verified by rasterizing it rather than just reading PDF operators. Read how PeachPDF is tested, or see the output for yourself.
Ready to render?
dotnet add package PeachPDF
Get started in a few lines, or browse the feature showcase to see real output first.