RailReader.Core.Pdfium
0.44.0
See the version list below for details.
dotnet add package RailReader.Core.Pdfium --version 0.44.0
NuGet\Install-Package RailReader.Core.Pdfium -Version 0.44.0
<PackageReference Include="RailReader.Core.Pdfium" Version="0.44.0" />
<PackageVersion Include="RailReader.Core.Pdfium" Version="0.44.0" />
<PackageReference Include="RailReader.Core.Pdfium" />
paket add RailReader.Core.Pdfium --version 0.44.0
#r "nuget: RailReader.Core.Pdfium, 0.44.0"
#:package RailReader.Core.Pdfium@0.44.0
#addin nuget:?package=RailReader.Core.Pdfium&version=0.44.0
#tool nuget:?package=RailReader.Core.Pdfium&version=0.44.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
- RailReader.Core (>= 0.44.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on RailReader.Core.Pdfium:
| Package | Downloads |
|---|---|
|
RailReader.Renderer.Skia
SkiaSharp rasterisation and IPdfServiceFactory implementation for desktop PDF rendering via PDFium. |
|
|
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.56.1 | 0 | 8/12/2026 |
| 0.56.0 | 0 | 8/12/2026 |
| 0.55.0 | 8 | 8/11/2026 |
| 0.54.0 | 29 | 8/11/2026 |
| 0.53.0 | 31 | 8/11/2026 |
| 0.52.1 | 60 | 8/10/2026 |
| 0.52.0 | 82 | 8/8/2026 |
| 0.51.0 | 75 | 8/7/2026 |
| 0.50.0 | 146 | 7/25/2026 |
| 0.48.0 | 150 | 7/12/2026 |
| 0.47.0 | 144 | 7/5/2026 |
| 0.46.0 | 151 | 6/30/2026 |
| 0.45.2 | 149 | 6/29/2026 |
| 0.45.1 | 128 | 6/28/2026 |
| 0.45.0 | 129 | 6/27/2026 |
| 0.44.0 | 145 | 6/23/2026 |
| 0.43.0 | 141 | 6/23/2026 |
| 0.42.0 | 166 | 6/22/2026 |
| 0.41.0 | 138 | 6/21/2026 |
| 0.40.0 | 138 | 6/21/2026 |