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
- Validate SkiaSharp on your target OS (containers, App Service, etc.).
- Call
FontAwesomeFreeIcons.Register()once per process before first icon. - Quill: prefer Delta for storage; remote images are opt-in.
Chart.Lineis for static PDF graphics.
9. Support & versioning
- SemVer from
version.txt(alphasX.Y.Z-aN). - Private GitHub Packages only.
- Pin an exact version in production; read whats-new before upgrading.
10. Checklist
- NuGet source
githubwithread:packages - Packages restored at 0.7.0-a1 (or later 0.7.x)
- Code rewritten to Compose (no
Document.Create/IContainer) -
FontAwesomeFreeIcons.Register()if using Free icons - NOTICE / attribution retained
- Smoke-test multi-page table, Quill body, chart on deployment OS