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

XML → XSLT → XSL-FO → PDF transformation helpers for microservice applications. Builds on Genocs.Fonet to turn printable documents and XSLT templates into PDF streams. Supports net10.0, net9.0, and net8.0.
Installation
dotnet add package Genocs.Fonet.XsltTransformer
This package depends on Genocs.Fonet, Genocs.Core, and Genocs.Logging.
Getting Started
Implement IPrintableDocument (or IPayload) for your model, place XSLT templates where ResourceManager can load them, then generate a PDF:
using Genocs.Fonet.XsltTransformer.Transformers;
using Microsoft.Extensions.Logging.Abstractions;
IPrintableDocument document = /* your document */;
var pdfService = new XslFoPdfService(NullLogger<XslFoPdfService>.Instance);
using Stream pdf = pdfService.Print(
document,
templateName: "./templates/invoice.fo",
resourcesName: "./templates/resources.xml",
fontsDirectory: "./fonts",
countryId: "IT");
Or render an already-produced XSL-FO XmlDocument directly:
using Genocs.Fonet.XsltTransformer.Transformers;
PdfPrinterDriver.MakePdf(xslFoDocument, "./output/invoice.pdf", fontDir: "fonts");
// or
using Stream pdf = PdfPrinterDriver.MakePdfStream(xslFoDocument, fontDir: "fonts");
Main Entry Points
IPdfWriterService/XslFoPdfServiceIPrintableDocument/IPayloadPdfPrinterDriver(MakePdf,MakePdfStream)XmlTransformationManagerObjectXmlSerializerResourceManagerXsltExtensionsGlobalSettings
Pipeline Overview
- Serialize or supply an
IPrintableDocumentas XML (ToXml()). - Load the XSLT template (and optional localized resources) via
ResourceManager. - Transform XML → XSL-FO with
XmlTransformationManager. - Render FO → PDF through
PdfPrinterDriver/Genocs.Fonet.FonetDriver.
When a fonts directory is provided, private fonts are registered and embedded (FontType.Embed) so output is portable.
Configuration Notes
XslFoPdfService.Printrequires a non-emptytemplateName.fontsDirectoryis resolved relative to the executing folder when needed (XsltExtensions.GetExecutingFolder).countryIdselects localized XSLT/resource variants when present.PdfPrinterDriverimage handling acceptsdata:image/...;base64,...sources used byfo:external-graphic.- Template and localization base paths are controlled through
ResourceManager/GlobalSettings(XsltFolderPath,LocalizationXmlFolderPath,DefaultCulture,DefaultDateFormat).
Package Relationship
| Package | Role |
|---|---|
Genocs.Fonet |
Core XSL-FO → PDF engine |
Genocs.Fonet.XsltTransformer |
Opinionated XML/XSLT workflow on top of Genocs.Fonet |
Use Genocs.Fonet alone when you already produce XSL-FO. Use this package when templates, localization XML, and document models drive PDF generation.
Linux / Docker Notes
PDF rendering relies on SkiaSharp native assets from Genocs.Fonet. In Docker/Linux hosts, reference SkiaSharp.NativeAssets.Linux on the executable project if libSkiaSharp.so is missing at runtime.
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
- Genocs.Core (>= 9.0.2)
- Genocs.Fonet (>= 3.0.1)
- Genocs.Logging (>= 9.0.2)
-
net8.0
- Genocs.Core (>= 9.0.2)
- Genocs.Fonet (>= 3.0.1)
- Genocs.Logging (>= 9.0.2)
-
net9.0
- Genocs.Core (>= 9.0.2)
- Genocs.Fonet (>= 3.0.1)
- Genocs.Logging (>= 9.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.1 | 92 | 10/7/2026 |
The change log and breaking changes are listed here.
https://github.com/Genocs/genocs-fonet/releases