Rivoli PDF
An in-process .NET PDF library for building, reading, and round-tripping PDFs, with no external executables (no Ghostscript, no browser engine) and deterministic, reproducible output. Layout and PDF writing are pure managed code; raster image work goes through SkiaSharp’s NuGet-restored native assets.
You describe a document as a plain in-memory tree, and Rivoli PDF lays it out and writes a PDF. The same model serializes to JSON, diffs, and caches, so you can build documents on a server, edit them, and only pay for layout when you need pixels.
using Rivoli.Pdf;using Rivoli.Pdf.Model;
var doc = Document.Create("Hello", "Rivoli.Pdf");var section = doc.AddSection();section.H1("Hello, world");section.AddParagraph("Your first PDF in three lines of content.");
doc.SavePdf("hello.pdf");Where to start
Section titled “Where to start”- Getting started: install the package and produce your first PDF in under five minutes.
- Tutorial: a seven-chapter jump-start, from building blocks to PDF/A and accessibility.
- How-to guides: focused, task-oriented recipes.
- Concepts: the DOM model, layout engine, and styling cascade explained.
- Code patterns: how to keep larger documents clean and reusable.
- API reference: a map of the public namespaces and entry points.
What it does
Section titled “What it does”| Area | Capabilities |
|---|---|
| Authoring | Sections, paragraphs, headings, tables, lists, images, the styling cascade, headers/footers, multi-column layout, AcroForm fields |
| Output | PDF 1.4–1.7, tagged PDF, PDF/A-1a/1b, XMP metadata, AES-128/256 encryption with permissions, digital signatures |
| Operations | Merge, split, load/import, and a deterministic round-trip fidelity harness validated against a PDFium oracle |
PDF authoring is the primary path, with reading/import and rasterization also supported. See the FAQ for details.
Install
Section titled “Install”dotnet add package Rivoli.Pdf.Coredotnet add package Rivoli.PdfTargets .NET 8 and .NET 10 on Windows, Linux, and macOS. Licensed under the Rivoli PDF License: source-available; free for individuals and for organizations with annual gross revenue under USD 1,000,000. Source on GitHub.