Foliant.Core 1.8.1

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

Foliant

Layout-aware PDF document AI for .NET — fully local, no Python sidecar, no cloud APIs.

Foliant extracts structured content (Markdown / JSON / typed objects) from PDFs the way commercial document-intelligence services do: layout detection, per-region OCR, table-structure recognition, and reading-order assembly — all running on ONNX Runtime, entirely on your machine. Documents never leave the host.

using Foliant.Pipeline;

// Models download once into a local cache (SHA-256 verified), then everything runs offline.
using var processor = await FoliantProcessor.CreateDefaultAsync();
var result = await processor.ProcessAsync(File.ReadAllBytes("document.pdf"));

Console.WriteLine(result.Markdown);          // layout-aware Markdown
string json = result.ToJson(indented: true); // structured regions, tables, bounds, confidence

Why Foliant

  • Born-digital fast path — pages with an embedded text layer take characters verbatim (layout still analyzed from pixels); OCR runs only where needed. ~0.4 s/page at 300 DPI.
  • Forms done right — recursive ruling-line decomposition keeps checkbox marks, field labels, and values associated on government-style forms; table grids come from a hybrid of Microsoft TableTransformer and rule-based ruling analysis, with a grid-fit guard that renders a mis-detected form block as ordered prose instead of a scrambled table. Opt-in Foliant.Forms.* profile packs add typed key-value extraction for known form families.
  • Self-verifying — every page enforces a coverage invariant (every extracted line provably lands in the output or is intentional page furniture), reports word recall against the PDF's own text layer, and scores reading-order fidelity against that text layer's order — so a page that keeps every word but permutes it is caught (word recall alone is order-blind). On a 474-page federal-RFP reference corpus: 99.7% average word recall, 100% of pages ≥95%, zero text loss, zero fabricated form values.
  • Pluggable — every stage (layout, OCR, tables, reading order) is an interface in Foliant.Core; swap any backend without forking.

Packages

Package Purpose
Foliant.Pipeline Batteries-included default pipeline (start here)
Foliant.Core Interfaces + DTOs only — for consumers and backend authors
Foliant.Layout.DocLayoutNet DocLayout-YOLO layout detection backend
Foliant.Ocr.PaddleOcr PaddleOCR detection/recognition backend with rotated-text handling
Foliant.Tables.TableTransformer TableTransformer + ruling-grid table structure backend
Foliant.Models Model catalog + verified local cache (weights from Hugging Face)

Model weights (~280 MB total) are not inside the packages; they download on first use with checksum verification, or pre-fetch them yourself and point FoliantProcessor.CreateDefault at the directory.

Apache 2.0. English-language documents. Scanned-document support ships today — deskew, denoise, contrast normalization, and coarse page-orientation correction (0/90/180/270°); page dewarp and low-DPI super-resolution are on the roadmap.

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 (12)

Showing the top 5 NuGet packages that depend on Foliant.Core:

Package Downloads
Foliant.Models

Model asset catalog and local cache for Foliant: lazily downloads ONNX model weights from Hugging Face on first use, with SHA-256 verification. No model weights ship inside NuGet packages.

Foliant.Layout.DocLayoutNet

DocLayout-YOLO layout-detection backend for Foliant (ONNX, runs fully local via ONNX Runtime). Classifies page regions: text, title, table, figure, captions, formulas, page furniture.

Foliant.Ocr.PaddleOcr

PaddleOCR backend for Foliant (ONNX, runs fully local via ONNX Runtime): DB text detection + CTC recognition, with rotated-textline handling.

Foliant.Tables.TableTransformer

Microsoft TableTransformer table-structure backend for Foliant (ONNX, runs fully local via ONNX Runtime): detects table rows/columns and assembles cell grids.

Foliant.Tables.PaddleStructure

PaddleStructure (SLANet-plus) table-structure backend for Foliant (ONNX, runs fully local via ONNX Runtime): purpose-built for raster/screenshot tables — emits HTML-style structure with row/column spans and per-cell boxes.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.8.1 295 7/20/2026
1.7.1 217 7/12/2026
1.7.0 213 7/12/2026
1.6.0 224 7/5/2026
1.5.0 213 7/3/2026
1.4.0 227 6/27/2026
1.3.3 209 6/21/2026
1.3.2 206 6/21/2026
1.3.1 205 6/21/2026
1.3.0 206 6/21/2026
1.2.0 208 6/21/2026
1.1.1 204 6/19/2026
1.1.0 200 6/19/2026
1.0.2 193 6/15/2026
1.0.1 192 6/15/2026
1.0.0 198 6/15/2026
0.7.0 193 6/15/2026
0.6.0 178 6/14/2026
0.5.0 176 6/14/2026
0.4.0 171 6/14/2026
Loading failed