NetPdf

v1.0.1 · net8.0 · net9.0 · net10.0 · net11.0 · Windows, macOS, Linux

PDFs in .NET, without the plumbing

Create, lay out, read, render, sign, and manage PDF files through one fluent API — with five proven libraries doing the heavy lifting underneath.

$dotnet add package NetPdfKit
View on NuGet
Report.cs
using NetPdf.Fluent;

Document.Create(doc => doc
    .Page(page => page
        .Size(PageSizes.A4)
        .Margin(50)
        .Header(h => h.Text("ACME Quarterly Report"))
        .Content(c => c
            .Padding(10)
            .Column(column =>
            {
                column.Spacing(8);
                column.Item().Text("Body text wraps and flows across pages automatically.");
                column.Item().Row(row =>
                {
                    row.ConstantItem(120).Text("Label");
                    row.RelativeItem().Text("Value that takes the remaining width");
                });
            }))
        .Footer(f => f.AlignCenter().PageNumber("Page {number} of {total}"))))
    .Save("report.pdf");

One package, the whole lifecycle

The same document model carries a file from creation through to a verified signature.

Content is measured and paginated automatically — headers and footers repeat, page numbers resolve.

C#
using NetPdf.Fluent;

Document.Create(doc => doc
    .Page(page => page
        .Size(PageSizes.A4)
        .Margin(50)
        .Header(h => h.Text("ACME Quarterly Report"))
        .Content(c => c
            .Padding(10)
            .Column(column =>
            {
                column.Spacing(8);
                column.Item().Text("Body text wraps and flows across pages automatically.");
                column.Item().Row(row =>
                {
                    row.ConstantItem(120).Text("Label");
                    row.RelativeItem().Text("Value that takes the remaining width");
                });
            }))
        .Footer(f => f.AlignCenter().PageNumber("Page {number} of {total}"))))
    .Save("report.pdf");

Five proven libraries. One API.

NetPdf doesn't reimplement PDF. It wraps battle-tested, permissively-licensed libraries behind a single coherent document model — so you learn one surface instead of five, and never wire them together yourself.

Everything a PDF has to do

From a one-page receipt to a signed, accessible, PDF/A-conformant report.

See it as you build it

Swap .Save() for .ShowInPreviewer() and run under dotnet watch. The previewer window re-renders on every rebuild, and generation errors land in an error panel instead of killing the loop.

About the previewer
Program.cs
using NetPdf.Fluent;
using NetPdf.Previewer;

Document.Create(doc => doc
    .Page(page => page
        .Content(c => c.Text("Hello, previewer!"))))
    .ShowInPreviewer(); // instead of .Save()/.ToBytes() while designing