ZX.Folio 1.0.0

dotnet add package ZX.Folio --version 1.0.0
                    
NuGet\Install-Package ZX.Folio -Version 1.0.0
                    
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="ZX.Folio" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ZX.Folio" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ZX.Folio" />
                    
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 ZX.Folio --version 1.0.0
                    
#r "nuget: ZX.Folio, 1.0.0"
                    
#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 ZX.Folio@1.0.0
                    
#: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=ZX.Folio&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ZX.Folio&version=1.0.0
                    
Install as a Cake Tool

ZX.Folio

Folio's document engine for .NET, in one package: Word-like documents with real pages, templates and mail merge, tagged PDF and Word output, Word and HTML input, and an accessibility check. It runs inside your application: no service, no web API, no other packages to install.

Install

dotnet add package ZX.Folio

Merge a template and make a PDF

using Folio.Core.Fonts;
using Folio.Core.Json;
using Folio.Core.Layout;
using Folio.Fonts;
using Folio.Pdf;
using Folio.Templating;

var template = DocumentJson.Parse(File.ReadAllText("invoice.json"));    // a Folio document with {{tags}}
var merged = TemplateEngine.Merge(template, File.ReadAllText("invoice-data.json")).Document;

var fonts = new FontRegistry();
FolioFonts.Register(fonts);                                              // Liberation Sans, included
var session = new LayoutSession(fonts);
session.Load(merged);
File.WriteAllBytes("invoice.pdf", PdfRenderer.Render(session));         // a tagged PDF, pages as laid out

XML data works the same way: TemplateEngine.MergeXml(template, xml). A JSON array merges one copy per record.

Also in the package

Build a document in code new DocumentBuilder().Heading("…").Paragraph(p => p.Text("…").Bold("…")).Build() (Folio.Core.Api)
Word DocxWriter.Write(document) and DocxReader.Read(bytes) (Folio.Docx)
HTML HtmlImport.FromMarkup(html) and ClipboardHtml.Write(blocks, images) (Folio.Html); HTML from Word, Excel, Outlook and Google Docs with new HtmlImportOptions { Dialects = OfficeDialects.All } (Folio.Html.Office)
Accessibility AccessibilityChecker.Check(document, new A11yOptions()) (Folio.Core.Accessibility), or new PdfOptions { RequireAccessible = true } to refuse an inaccessible PDF
Documents as JSON DocumentJson.Parse(json) and DocumentJson.Serialize(document) (Folio.Core.Json)

Fonts

Layout needs at least one font. The package carries Liberation Sans in regular, bold, italic and bold italic, with the widths of Arial and Helvetica; it stands in for any font a document names that is not registered. For documents in other fonts, register those too: fonts.Register(File.ReadAllBytes("MyFont.ttf")). Liberation Sans is under the SIL Open Font License 1.1, which comes with it (fonts/liberation/LICENSE in the package).

Licence

Free to use, commercial or not, and to build into your own applications; not to be changed, or distributed on its own. The terms are in LICENSE.txt in the package.

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

    • No dependencies.

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
1.0.0 0 11/10/2026