Skip to main content

.NET 10 · MIT · NuGet

AdCodicem.
Pdf

Managed PDF generation and manipulation for .NET.

Generate documents from HTML, and read, assemble and transform existing ones, with no headless browser, no native PDF engine and no external process. Today it reads, repairs and validates; the roadmap says what comes next.

dotnet add package AdCodicem.Pdf --prerelease
Program.cs
using AdCodicem.Pdf.Documents;
using AdCodicem.Pdf.Validation;

// Opened lazily: an object is read when it is first asked for.
using var document = PdfDocument.Open(args[0]);

// What the reader worked around to open the file.
foreach (var entry in document.Diagnostics)
{
Console.WriteLine(entry);
}

// What is wrong with the file, rule by rule, each with its remedy.
var report = new PdfValidator().Validate(document);
foreach (var finding in report.Findings)
{
Console.WriteLine($"{finding}\n Remedy: {finding.Remedy}");
}
01

Managed all the way down

No headless browser, no native PDF engine, no external process. The core package has no dependencies at all and is compatible with Native AOT and trimming.

02

Streaming by default

Documents are read lazily and written forward-only. Memory follows the heaviest page, not the size of the file: a 10 000-page report costs what a 10-page one costs.

03

Business documents, not the web

The CSS box model, tables, paged media, flexbox, simple grid and inline SVG, for invoices, reports, contracts and case files. No JavaScript.

04

Conformance as a constraint

Tagged PDF for accessibility, PDF/A-3 and Factur-X for archiving and e-invoicing, designed in from the start rather than added later.

05

Honest about damaged input

Real-world PDFs are often malformed. The reader repairs what it can and reports each repair as a diagnostic with a code that stays the same from one release to the next.