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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Genocs.Fonet" Version="3.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Genocs.Fonet" Version="3.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Genocs.Fonet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Genocs.Fonet --version 3.0.1
                    
#r "nuget: Genocs.Fonet, 3.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Genocs.Fonet@3.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Genocs.Fonet&version=3.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Genocs.Fonet&version=3.0.1
                    
Install as a Cake Tool

Genocs.Fonet

Genocs.Fonet Banner

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.Make
  • FonetDriver.Render (stream, XmlDocument, or XmlReader)
  • PdfRendererOptions
  • PdfRendererOptions.AddPrivateFont
  • FontType (Link or Embed)
  • FonetDriver.BaseDirectory (resolve relative external resources)
  • FonetDriver.ImageHandler (custom external-graphic loading)

Configuration Notes

  • PdfRendererOptions.FontType defaults to FontType.Link. Prefer FontType.Embed when PDFs must render identically across machines.
  • Register custom fonts with AddPrivateFont before calling Render.
  • BaseDirectory defaults to the current working directory and is used to resolve relative image paths.
  • Timeout controls HTTP fetches for remote resources (default 100000 ms).
  • Optional PDF metadata: Title, Subject, Author, keywords via AddKeyword.
  • Optional encryption uses legacy RC4 via OwnerPassword / UserPassword and 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

Release Notes

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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