Genocs.Fonet
3.0.1
Requires NuGet 5.0.0 or higher.
dotnet add package Genocs.Fonet --version 3.0.1
NuGet\Install-Package Genocs.Fonet -Version 3.0.1
<PackageReference Include="Genocs.Fonet" Version="3.0.1" />
<PackageVersion Include="Genocs.Fonet" Version="3.0.1" />
<PackageReference Include="Genocs.Fonet" />
paket add Genocs.Fonet --version 3.0.1
#r "nuget: Genocs.Fonet, 3.0.1"
#:package Genocs.Fonet@3.0.1
#addin nuget:?package=Genocs.Fonet&version=3.0.1
#tool nuget:?package=Genocs.Fonet&version=3.0.1
Genocs.Fonet

XSL-FO to PDF library for applications based on microservices. A cross-platform .NET port of Fonet that renders Formatting Objects to PDF without Windows GDI dependencies. Supports net10.0, net9.0, and net8.0.
Installation
dotnet add package Genocs.Fonet
Getting Started
Use this package when you already have XSL-FO input and need PDF output. Font enumeration, typeface loading, and image decoding are backed by SkiaSharp so the library runs on Windows, Linux, and macOS.
using Genocs.Fonet;
using Genocs.Fonet.Render.Pdf;
var driver = FonetDriver.Make();
driver.Options = new PdfRendererOptions
{
Title = "Sample document",
Author = "Genocs",
FontType = FontType.Embed
};
driver.Options.AddPrivateFont(new FileInfo("./fonts/Nunito-Regular.ttf"));
driver.Options.AddPrivateFont(new FileInfo("./fonts/Nunito-Bold.ttf"));
using var input = File.OpenRead("./templates/document.fo");
using var output = File.Create("./output/document.pdf");
driver.Render(input, output);
Reference the private font from FO:
<fo:block font-family="Nunito" font-size="16pt">
Hello Nunito
</fo:block>
You can also render from an XmlDocument or XmlReader:
var doc = new XmlDocument();
doc.Load("./templates/document.fo");
driver.Render(doc, output);
Main Entry Points
FonetDriver/FonetDriver.MakeFonetDriver.Render(stream,XmlDocument, orXmlReader)PdfRendererOptionsPdfRendererOptions.AddPrivateFontFontType(LinkorEmbed)FonetDriver.BaseDirectory(resolve relative external resources)FonetDriver.ImageHandler(customexternal-graphicloading)
Configuration Notes
PdfRendererOptions.FontTypedefaults toFontType.Link. PreferFontType.Embedwhen PDFs must render identically across machines.- Register custom fonts with
AddPrivateFontbefore callingRender. BaseDirectorydefaults to the current working directory and is used to resolve relative image paths.Timeoutcontrols HTTP fetches for remote resources (default100000ms).- Optional PDF metadata:
Title,Subject,Author, keywords viaAddKeyword. - Optional encryption uses legacy RC4 via
OwnerPassword/UserPasswordand permission flags (EnablePrinting,EnableModify,EnableCopy,EnableAdd).
Package Relationship
| Package | Role |
|---|---|
Genocs.Fonet |
Core XSL-FO → PDF engine |
Genocs.Fonet.XsltTransformer |
Higher-level XML → XSLT → FO → PDF pipeline built on this package |
Install Genocs.Fonet.XsltTransformer when you want to transform domain XML with XSLT templates instead of supplying FO directly.
Linux / Docker Notes
This package references SkiaSharp and SkiaSharp.NativeAssets.Linux. For self-contained Docker publishes, also reference SkiaSharp.NativeAssets.Linux in the host project if native assets are not copied transitively.
Known Limitations
This library is under active migration. Before production use, review:
- Unimplemented FO properties and elements (stubs log warnings)
- Side-float layout gaps
- System font discovery precision on Linux/macOS
- CJK / complex script validation status
- Legacy RC4-only PDF encryption
Details live in the repository docs linked below.
Support
- Documentation Portal: https://genocs-blog.netlify.app/
- Documentation: https://github.com/Genocs/genocs-fonet/tree/main/docs
- Repository: https://github.com/Genocs/genocs-fonet
Release Notes
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- SkiaSharp (>= 4.153.1)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 4.153.1)
- Svg.Skia (>= 5.2.3)
-
net8.0
- SkiaSharp (>= 4.153.1)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 4.153.1)
- Svg.Skia (>= 5.2.3)
-
net9.0
- SkiaSharp (>= 4.153.1)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 4.153.1)
- Svg.Skia (>= 5.2.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Genocs.Fonet:
| Package | Downloads |
|---|---|
|
Genocs.Fonet.XsltTransformer
Fonet XSLT to PDF Transformer library. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.1 | 99 | 10/7/2026 |
The change log and breaking changes are listed here.
https://github.com/Genocs/genocs-fonet/releases