Free and fully featured PDF generation for C# and .NET
Documentation • Quick start • Guides • API reference • Benchmarks • NuGet
| Free, for everyone | Fully featured | Plain .NET |
|---|---|---|
| MIT-licensed, for commercial and closed-source software, and it stays MIT. No revenue limits, keys or tiers. | Tables across pages, both text directions, complex scripts, PDF/A, PDF/UA, encryption and merging. | Managed code, no native dependencies. .NET 10 and .NET Standard 2.0 (.NET Framework 4.7.2 and later). |
dotnet add package Rustaveli.Pdf
Code
using Rustaveli.Pdf; (string Item, string Amount)[] lines = [ ("Design review", "1,600.00"), ("Implementation", "7,200.00"), ("Support, one month", "450.00"), ]; Ink blue = Ink.Hex("#1565C0"); Document invoice = Document.Compose(composition => composition.Section(section => { section.Trim = PaperSizes.A5; section.Margins = Sides.All(40); section.DefaultType = TypeStyle.Default.WithPointSize(10); section.Body().Stack(stack => { stack.SpaceBetween(20); stack.Add().Text(text => { text.Line("Invoice INV-0042") .PointSize(22) .Bold() .Ink(blue); text.Line("Issued 29 September 2026, due in 30 days"); }); stack.Add().Table(table => { table.Columns(columns => { columns.Share(); columns.Fixed(70); }); table.HeaderRows(header => { header .Cell() .Fill(blue) .Inset(6) .Text(text => text .Run("Item") .Bold() .Ink(Ink.White)); header .Cell() .Fill(blue) .Inset(6) .FlushRight() .Text(text => text .Run("Amount") .Bold() .Ink(Ink.White)); }); foreach ((string item, string amount) in lines) { table .Cell() .StrokeBottom(0.5f) .Inset(6) .Text(item); table .Cell() .StrokeBottom(0.5f) .Inset(6) .FlushRight() .Text(amount); } }); stack .Add() .FlushRight() .Text(text => text .Run("Total due 9,250.00") .PointSize(14) .Bold()); }); })); invoice.ExportPdf("invoice.pdf");
Measured again on every merge to main (as text, history):
- Typography: OpenType features, kerning, fallback fonts per character, text in both directions, Arabic and Indic scripts.
- Images and artwork: JPEG and PNG embedded as they are, SVG and drawn paths kept as vectors.
- Standards: PDF/A-2 and A-3, tagged PDF and PDF/UA, AES-256, each checked by veraPDF and qpdf.
- Existing files: merge, stamp, attach electronic invoices, protect and linearise.
- Live preview: redraws as you edit, with an inspector that opens the code behind any frame.
Rustaveli.Pdf sets out to give C# and .NET a complete PDF generation toolkit that is free for everyone, for good. It is MIT-licensed, and every future release will be too.
It is built with an AI coding agent. A change is merged only after more than 10,000 tests pass, including veraPDF validation of PDF/A and PDF/UA output. The parsers are fuzzed every night, and every merge is benchmarked.
QuestPDF's MIT-licensed releases are its reference: they inspired its design, and its tests and benchmarks compare against their output. Rustaveli.Pdf and QuestPDF sets out how the two libraries relate.
- Guides, starting with getting started
- API reference
- Features and known limitations
- Coming from QuestPDF, and how the two libraries relate: Rustaveli.Pdf and QuestPDF
- Changelog
MIT — see LICENSE. The bundled Noto Sans is under the SIL Open Font License.



