Frisket 0.13.0
dotnet add package Frisket --version 0.13.0
NuGet\Install-Package Frisket -Version 0.13.0
<PackageReference Include="Frisket" Version="0.13.0" />
<PackageVersion Include="Frisket" Version="0.13.0" />
<PackageReference Include="Frisket" />
paket add Frisket --version 0.13.0
#r "nuget: Frisket, 0.13.0"
#:package Frisket@0.13.0
#addin nuget:?package=Frisket&version=0.13.0
#tool nuget:?package=Frisket&version=0.13.0
Frisket
A document engine for .NET 10 with no third-party dependencies. A template is a JSON file, the data is another, and the engine lays the two out into a PDF or an SVG proof - writing its own PDF, measuring its own type and encoding its own barcodes.
using Frisket;
Report template = Report.FromFile("invoice.json");
Report report = ReportBinder.Bind(template, File.ReadAllText("invoice.data.json"));
var pdf = new PdfBackend(new FontLibrary());
ReportRenderer.Render(report, pdf);
File.WriteAllBytes("invoice.pdf", pdf.ToArray());
Given the same template, data and date, the output is the same file byte for byte.
What it does
- Layout - flowing or pinned to coordinates, headers and footers, tables whose rows split across pages and whose columns the data can drop, columns that balance, justified text, sections with a page size of their own.
- PDF - PDF/A-3B and PDF/UA-1 (
Conformance = PdfConformance.PdfA3b,Tagged = true), both validated with veraPDF; Factur-X attachments; fillable forms, and signature fields a signing platform can sign. - Type - cap heights measured from the glyph outline rather than taken from the font's own claims, so 3 mm capitals are 3 mm in every typeface; fonts are subset into the file.
- Codes - QR and Code 128, generated here.
- Pictures - JPEG, PNG with or without an alpha channel, and charts drawn by your application as SVG, written into the PDF as vector marks and real text. What is taken is listed, and the rest is refused by name rather than skipped.
- Checks -
TemplateValidator.Check(report)says what will go wrong before any document exists: a figure with no alternative text, two fields sharing a name, a table row one cell short. Told what is about to be produced, it also says what that output will lose - a form flattened into a picture of one, a role dropped from untagged output.
Templates written by a program
A template can come from a program or a language model as well as from a person. The JSON Schema in the repository describes every type and property, and the checks say what is wrong and where, so a program can correct the template and check it again:
var issues = new List<TemplateIssue>(TemplateJson.Check(json)); // names the reader skips
if (!issues.Any(i => i.Rule == "read.invalid"))
{
Report template = Report.FromJson(json);
issues.AddRange(TemplateValidator.Check(template));
issues.AddRange(TemplateFields.Check(template, catalogueJson)); // tokens the data lacks
}
string findings = TemplateIssue.ToJson(issues); // each with a JSON Pointer into the template
TemplateData.Check(template, dataJson) asks the same of what the data brings, such as a chart the
template knows only by name, and SvgDrawing.Check(svg, fonts) of one drawing on its own.
TemplateJson.Check names a property the engine does not read, which would otherwise be
skipped in silence, along with the name probably meant. TemplateFields.Check holds every
token to the host's catalogue of fields, the array the content editor is handed.
examples/ai is the guide for
wiring a model to these checks.
A smaller file
The PDF is deflated with the framework's zlib, and the package depends on nothing else. For a smaller file, hand the backend another encoder - Zopfli, through the ZopfliSharp package, takes 6 to 12 per cent off for about a hundred times the time:
pdf.Compressor = data => Zopfli.Compress(data, ZopfliFormat.Zlib);
Every stream the file deflates goes through it, and what it hands back is checked before it
goes in. CompressionThreads = -1 spreads the streams over the cores, for the same bytes.
Fonts
A FontLibrary nobody fills draws with the typefaces in
Frisket.Fonts, a dependency of this package:
Mulish for text that names no family, plus Elms Sans, Noto Sans Display and Glametrix.
Register a font of your own - Register, RegisterDirectory - and only yours are used. A
family a template names and the library does not hold is refused, never substituted:
another face would re-wrap every line.
More
The repository holds the template designer, the content editor, a command-line tool, a C interface with C++, Pascal and Python wrappers, and the reasons behind each decision: github.com/fderenty/Frisket.
MIT licence. The bundled typefaces are under the SIL Open Font License 1.1.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Frisket.Fonts (>= 0.13.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Frisket:
| Package | Downloads |
|---|---|
|
Frisket.Import
Reads one page out of an existing PDF and hands it to Frisket, which lays it out like a picture and writes it as a Form XObject. A copy, not a rendering: the page's marks and resources travel as they are. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.13.0 | 50 | 11/8/2026 |
| 0.12.0 | 66 | 11/6/2026 |
| 0.11.0 | 80 | 11/4/2026 |
| 0.10.0 | 82 | 11/4/2026 |
| 0.9.0 | 83 | 11/4/2026 |
| 0.8.0 | 89 | 11/4/2026 |
| 0.7.0 | 93 | 11/3/2026 |
| 0.6.1 | 86 | 11/3/2026 |
| 0.6.0 | 137 | 11/2/2026 |
| 0.5.0 | 99 | 11/2/2026 |
| 0.4.1 | 103 | 11/2/2026 |
| 0.4.0 | 113 | 11/1/2026 |
| 0.3.0 | 106 | 11/1/2026 |
| 0.2.0 | 125 | 10/21/2026 |
| 0.1.0 | 108 | 10/18/2026 |