RailReader.Renderer.Skia
0.40.0
See the version list below for details.
dotnet add package RailReader.Renderer.Skia --version 0.40.0
NuGet\Install-Package RailReader.Renderer.Skia -Version 0.40.0
<PackageReference Include="RailReader.Renderer.Skia" Version="0.40.0" />
<PackageVersion Include="RailReader.Renderer.Skia" Version="0.40.0" />
<PackageReference Include="RailReader.Renderer.Skia" />
paket add RailReader.Renderer.Skia --version 0.40.0
#r "nuget: RailReader.Renderer.Skia, 0.40.0"
#:package RailReader.Renderer.Skia@0.40.0
#addin nuget:?package=RailReader.Renderer.Skia&version=0.40.0
#tool nuget:?package=RailReader.Renderer.Skia&version=0.40.0
RailReaderCore
Portable libraries powering RailReader2 and intended for reuse by future companion apps (web, mobile). Distributed as a set of NuGet packages.
Packages
| Project | Purpose | External deps |
|---|---|---|
RailReader.Core |
Portable abstractions, models, controllers, rail-navigation, line detection, search, annotations, reading-order resolvers | none (system only) |
RailReader.Core.Pdfium |
Desktop PDFium implementations of the Core interfaces + filesystem-backed AppConfig / AnnotationService / ConsoleLogger / LayoutModelLocator |
PDFium native libraries |
RailReader.Core.Analysis |
ONNX-backed ILayoutAnalyzer implementations (PP-DocLayoutV3, PP-DocLayout-S, Docling Heron) |
Microsoft.ML.OnnxRuntime |
RailReader.Core.Vlm.OpenAI |
IVlmService for OpenAI-compatible chat-completions endpoints (OpenAI, Ollama, vLLM, LightOnOCR, …) |
OpenAI |
RailReader.Renderer.Skia |
SkiaSharp rasterisation + IPdfServiceFactory that desktop consumers wire into Core |
SkiaSharp, PDFtoImage |
Reference graph
RailReader.Core ← no native deps, no IO
├─ Core.Pdfium → Core
├─ Core.Analysis → Core
├─ Core.Vlm.OpenAI → Core
└─ Renderer.Skia → Core + Core.Pdfium
A future Lite (web/WASM) app would consume RailReader.Core only and substitute its own IPdfService / IPdfTextService / ILayoutAnalyzer / IVlmService implementations (e.g. PDF.js, ORT-Web, browser fetch).
Model-agnostic layout pipeline
Core defines two seams that let any layout-detection model drive RailReader:
ILayoutAnalyzer— wraps a specific ONNX model and declares its class table + input size + whether it provides reading order viaLayoutModelCapabilities. Each detection is stamped with a portableBlockRole; Core never branches on the model-specific class id.IReadingOrderResolver— assigns 0..N-1 reading order to detected blocks. Three built-ins ship:ModelOrderResolver(trusts the analyzer's order hints — default pick for models withProvidesReadingOrder=true)XYCutPlusPlusResolver(column-aware recursive XY-cut, default for non-ordering models — handles two/three-column papers and full-width spanners correctly)TopDownReadingOrderResolver(Y-then-X baseline, retained as a debug fallback)
Core.Analysis ships three analyzers today:
| Analyzer | Model | Input | Reading order | Notes |
|---|---|---|---|---|
LayoutAnalyzer |
PP-DocLayoutV3 (RT-DETR) | 800×800 letterbox | model-provided | 25 classes; the existing default for the desktop app (~50 MB) |
PPDocLayoutSLayoutAnalyzer |
PP-DocLayout-S (PicoDet/GFL) | 1920 longest-edge raster → 480×480 internal | XYCut++ | 23 classes; lightweight (~4.7 MB) — intended detector for future web (WASM/ORT-Web) and mobile builds |
HeronLayoutAnalyzer |
Docling Heron (RT-DETRv2) | 640×640 resize | XYCut++ | 17 classes; broader category space (code, forms, key-value regions) (~164 MB) |
Additional analyzers slot in as further Core.Analysis types or as separate sibling packages — the existing three are the template.
Build & test
dotnet build RailReaderCore.slnx -c Release
dotnet test tests/RailReader.Core.Tests -c Release
Always use -c Release — debug builds are significantly slower on the inference paths.
Models
Core.Analysis consumers need at least one ONNX layout-detection model on disk:
./scripts/download-model.sh # default — PP-DocLayoutV3 (~50 MB, Apache-2.0)
./scripts/download-model.sh pps # PP-DocLayout-S (~4.7 MB, Apache-2.0; lightweight)
./scripts/download-model.sh heron # Docling Heron (~164 MB, Apache-2.0)
./scripts/download-model.sh all # all three
PP-DocLayout-S is sourced from stefanj0/PP-DocLayout-S-ONNX — a paddle2onnx export of the upstream PaddlePaddle/PP-DocLayout-S checkpoint (no official ONNX exists upstream). Override the source by setting PP_S_ONNX_URL before running the script.
Files land in ./models/. The model search order on disk is defined by Core.Pdfium's LayoutModelLocator (it walks several well-known locations relative to AppContext.BaseDirectory and AppConfig.ConfigDir).
License
MIT — see LICENSE.
| Product | Versions 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. |
-
net10.0
- PDFtoImage (>= 5.2.1)
- RailReader.Core (>= 0.40.0)
- RailReader.Core.Pdfium (>= 0.40.0)
- SkiaSharp (>= 3.119.4)
- SkiaSharp.NativeAssets.Linux (>= 3.119.4)
- SkiaSharp.NativeAssets.macOS (>= 3.119.4)
- SkiaSharp.NativeAssets.Win32 (>= 3.119.4)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on RailReader.Renderer.Skia:
| Package | Downloads |
|---|---|
|
RailReader.Export
PDF→Markdown export pipeline for RailReader. Composes the Core primitives (layout analysis, rendering, per-block VLM transcription) into a Markdown document, applying heading-level heuristics and per-block formatting policy. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.55.0 | 7 | 8/11/2026 |
| 0.54.0 | 26 | 8/11/2026 |
| 0.53.0 | 30 | 8/11/2026 |
| 0.52.1 | 86 | 8/10/2026 |
| 0.52.0 | 93 | 8/8/2026 |
| 0.51.0 | 107 | 8/7/2026 |
| 0.50.0 | 138 | 7/25/2026 |
| 0.48.0 | 144 | 7/12/2026 |
| 0.47.0 | 125 | 7/5/2026 |
| 0.46.0 | 143 | 6/30/2026 |
| 0.45.2 | 146 | 6/29/2026 |
| 0.45.1 | 124 | 6/28/2026 |
| 0.45.0 | 114 | 6/27/2026 |
| 0.44.0 | 133 | 6/23/2026 |
| 0.43.0 | 126 | 6/23/2026 |
| 0.42.0 | 157 | 6/22/2026 |
| 0.41.0 | 128 | 6/21/2026 |
| 0.40.0 | 119 | 6/21/2026 |
| 0.39.0 | 133 | 6/21/2026 |
| 0.38.0 | 117 | 6/21/2026 |