A feature rich C# PDF library.

JetsonPDF reads and writes PDF 2.0 documents from the spec up — no wrappers, no native bindings. AES-256 encryption, PKCS#7 signatures, PDF/A and PDF/UA conformance, plus a WPF adapter that round-trips between PDF and XAML.

60-second quickstart

Install the package, draw on a page, save the bytes.

dotnet add package JetsonPDF.Writer
using JetsonPDF;

var doc = new PdfDocument { Title = "Hello" };
var page = doc.AddPage(PageSize.Letter);

page.DrawText("Hello, PDF!",
    new PdfFont(FontFamily.Helvetica, 24),
    x: 72, y: 700);

doc.Save("hello.pdf");

That's a complete, valid PDF 2.0 file — no native dependencies, no layout engine to wire up, just C# you can drop into any .NET 8 project.

Pick your level

Three layered authoring APIs ship in the box. Drop down to the Writer for direct byte control, stay in the middle with Fluent, or model a whole document with Flow.

Fluent — layout DSL

QuestPDF-style API. Compose pages from header, footer, and content slots; rows, columns, and tables; per-run rich text with live page numbers.

using JetsonPDF;
using JetsonPDF.Fluent;

Document.Create(d => d.Page(p =>
{
    p.Size(PageSize.Letter);
    p.Margin(50);

    p.Header().AlignRight().Text(t =>
    {
        t.Span("Page ");
        t.CurrentPageNumber().Bold();
        t.Span(" / ");
        t.TotalPages().Bold();
    });

    p.Content().Column(col =>
    {
        col.Spacing(8);
        col.Item().Text("Invoice", s =>
        {
            s.FontSize  = 24;
            s.FontStyle = FontStyle.Bold;
            s.FontColor = Colors.IndigoDark;
        });
        col.Item().Text("Bill to: Acme Corporation");
    });
})).GeneratePdf("invoice.pdf");

Fluent API reference (PDF) · Full invoice example

Flow — Word-style DOM

Mutable retained-mode tree. FlowDocumentSectionParagraph/Table with named styles, footnotes, hyphenation, and an auto-built TOC.

using JetsonPDF;
using JetsonPDF.Flow;

var doc = new FlowDocument { Title = "Quarterly Report" };
var s   = doc.AddSection();
s.PageSize    = PageSize.Letter;
s.PageMargins = new Margins(72);

s.Body.Add(new Paragraph("Introduction")
    { Style = ParagraphStyle.Heading1 });

s.Body.Add(new Paragraph(p =>
{
    p.AddText("Revenue grew ");
    p.AddText("12%").Bold();
    p.AddText(" year over year");
    p.AddFootnote("Constant-currency basis.");
    p.AddText(".");
}) { Alignment = TextAlign.Justify });

doc.Save("report.pdf");

Flow API reference (PDF) · Full report example

API reference PDFs

Every public namespace ships with a generated, paginated reference doc — built by JetsonPDF itself out of samples/ApiDocGenerator:

Sample outputs

Rendered PDFs from the in-tree samples — open them to see what JetsonPDF actually produces:

Why JetsonPDF

Built from spec

Implemented directly against ISO 32000-2:2020 — COS objects, xref streams, content-stream operators, the lot. No third-party PDF engine sits in between you and the bytes.

No magic dependencies

Targets .NET 8. Two NuGet dependencies total: code-pages (WinAnsi) and the BCL's PKCS#7 stack. Everything else — fonts, filters, images, encryption — is in-tree.

Reader + Writer + WPF

Read any PDF into a typed object model, write a fresh one from your own model, or round-trip through XAML using the JetsonPDF.Wpf adapter. Symmetric APIs, shared types.

Production conformance

Declare PDF/A-1b, 2, 3 or PDF/UA-1, 2 and have the validator check it. Add invisible PKCS#7 signatures, DocTimeStamps, and a DSS/VRI catalog for PAdES B-LTA.

Capabilities at a glance

Writer

  • Standard 14 + embedded TrueType + Type 3 fonts
  • Vector paths, images, Form XObjects, transparency
  • Axial / radial / function / mesh shadings
  • Tiling patterns (coloured + uncoloured)
  • Object & xref streams, linearization, incremental updates

Annotations & forms

  • Every §12.5.6 subtype: link, markup, FreeText, geometric, file attachment, redact, sound, popup, caret, stamp
  • AcroForm widgets: text, check, radio, combo, list, button, signature, barcode
  • /AA field actions and /CO calculation order

Reader

  • PdfReader.Load → full ReadPdfDocument tree
  • Outlines, page labels, named dests, viewer prefs, OCGs, structure tree
  • Filters: Flate, DCT, LZW, ASCII85/Hex, CCITT G3 1D + 2D, JBIG2 (arithmetic + Huffman), JPX

Security

  • AES-128 + AES-256, full permission bits
  • PKCS#7 detached signatures (visible & invisible)
  • DocTimeStamp, FieldMDP, DocMDP
  • DSS / VRI catalog for PAdES B-LTA

Conformance

  • PDF 2.0 header, object streams, xref streams
  • Tagged PDF: nested structure, role + class maps, /Lang, /Alt, /ActualText
  • PDF/A-1b/2/3 + PDF/UA-1/2 declaration and validator

WPF integration

  • PdfToXamlConverter — render any PDF as a XAML tree
  • XamlToPdfConverter — live WPF layout, then emit PDF
  • <jetsonpdf:Document> + multi-page authoring with {jetsonpdf:PageNumber}
  • jetsonpdf:Form.* attached props for AcroForm widgets

Fluent layout DSL

  • Document.Create(d => d.Page(...)) — QuestPDF-style API
  • Header / Footer / Background / Foreground / Content slots
  • Column / Row / Table with row span, column span, repeating header, last-page footer
  • Two-pass renderer resolves {TotalPages} after layout
  • Form widgets via .AsTextField / .AsCheckBox / .AsComboBox / .AsPushButton

Flow document model

  • Word-like retained-mode DOM — FlowDocumentSectionParagraph/Table
  • Named styles with BasedOn; built-in Heading1..3 / Quote / Caption
  • Footnotes, endnotes, comments, drop caps, anchored images
  • Auto-built TableOfContents, EndnoteList, CommentList
  • Liang-pattern hyphenation; track-changes runs (AsInsertion/AsDeletion)

Full feature list → Examples →

Where it shines

Document compliance. If you ship invoices, contracts, or regulated reports, JetsonPDF is built to make PDF/A and PDF/UA declarations verifiable. doc.Validate() returns a list of PdfConformanceIssue entries; flip ThrowOnConformanceError to fail your build pipeline before a non-conformant file ever ships.
Long-term archival signatures. Sign a document, add a timestamp from any RFC 3161 TSA, then write a DSS/VRI catalog with the certs, CRLs, and OCSP responses inline — PAdES B-LTA in roughly thirty lines of C#.
WPF-native authoring. Compose your document with the WPF layout engine you already know. Grid, StackPanel, DockPanel, Border, data-bound TextBlocks and a PaginatedTable that overflows across pages all "just work."