Home / Docs / gn-pdf

gn-pdf — Customer handover

Package version: 0.7.0-a1
Feed: GitHub Packages (private) — not nuget.org
Owner: gerald-neumann
License: MIT (commercial use and resale allowed)

Handoff for teams integrating GeraldNeumann.GnPdf into document printing.


1. What you get

Package ID Role
GeraldNeumann.GnPdf Declarative Compose PDF API on SkiaSharp
GeraldNeumann.GnPdf.Icons.FontAwesome.Free Optional curated Font Awesome Free SVG icons
GeraldNeumann.GnPdf.Fonts.Carlito Optional Carlito fonts (Calibri alias) for containers

Target framework: net10.0

Typical documents: invoices, proposals, order confirmations, timesheets, expense sheets, purchase-order reports, Quill bodies, multi-page tables, charts.


2. Install from the private feed

One-time NuGet source

dotnet nuget add source "https://nuget.pkg.github.com/gerald-neumann/index.json" `
  --name github `
  --username YOUR_GITHUB_USERNAME `
  --password YOUR_PAT `
  --store-password-in-clear-text

Add packages

dotnet add package GeraldNeumann.GnPdf --version 0.7.0-a1
dotnet add package GeraldNeumann.GnPdf.Icons.FontAwesome.Free --version 0.7.0-a1

Keep packages on the same version.


3. Quick start

using GnPdf;
using GnPdf.Compose;
using GnPdf.Icons.FontAwesome.Free;

FontAwesomeFreeIcons.Register();

Pdf.Create()
    .Sheet(s => s
        .A4()
        .Margin(Length.Cm(2))
        .Body(Stack.Of(
            Track.Of(
                Slot.Grow(Text.Line("Hello gn-pdf").Size(18).Bold()),
                Slot.Fit(Icon.Named("building").Size(18))
            )
        )))
    .ToPdf("hello.pdf");

Primary namespaces: GnPdf, GnPdf.Compose, GnPdf.Charts, icon packages as needed.


4. Feature map

Need API / pattern
Page size & margins Pdf.Create().Sheet(s => s.A4().Margin(…))
Columns / rows / tables Stack, Track + Slot.*, Grid + .Header / .Cells
Keep short tables intact Default; opt out with grid.AllowBreak()
Force page break Break.Page
Keep a block on one page .KeepIntact()
Require remaining space Spacer.Need(pt) / .NeedSpace(pt)
Width constraints .MaxWidth / .MinWidth
Decorations over content Overlay.Of(content, layers…)
Icons (Free) FontAwesomeFreeIcons.Register() + Icon.Named(...)
Icons (FA Pro / duotone) IconRegistry.RegisterDuotone — not shipped
SVG Compose.Svg.From(...)
Line charts Chart.Line(...)
Quill body (HTML) Compose.Quill.Html(...)
Quill body (Delta JSON) Compose.Quill.Delta(...)
Named destinations / links .Anchor(...) / .LinkTo(...)
Stitch PDFs Pdf.Merge(...) (remaps /Dests)

Consumer notes: whats-new/ · CHANGELOG.md.


5. What’s new in 0.7 (breaking)

Declarative Compose API replaces the previous nested fluent builders. See whats-new/0.7.0.md.


6. Licensing & compliance

Component Notes
GnPdf MIT — OK for commercial use and resale
SkiaSharp / Svg.Skia / PDFsharp MIT (transitive)
Font Awesome Free Icons CC BY 4.0 — keep attribution (NOTICE)
Font Awesome Pro / Duotone Not redistributed
Demo letterhead / logo Sample branding only — do not ship as product assets

7. Demo as a reference

.\start-demo.ps1

Prefer patterns from demo/GnPdf.Demo/Documents/*.


8. Runtime notes


9. Support & versioning


10. Checklist