AI-guided rail reading for PDFs

A desktop PDF viewer that uses deep learning layout analysis to guide high-magnification reading — line by line, block by block. Built for comfortable, sustained reading of academic documents.

RailReader2 in action — AI-guided rail reading through an academic PDF at high magnification

Rail mode in action — navigating an academic paper line by line at high magnification

Why I built this

I'm a statistics lecturer at Nelson Mandela University in South Africa. I prefer to read academic PDFs at high magnification — it's simply more comfortable for me — but high magnification turns even simple reading into a navigation puzzle. You lose context, scrolling becomes inefficient, and most viewers simply aren't designed for sustained use at 3× zoom and above.

The problem isn't unique to people with visual impairments. Anyone who works with dense academic documents — papers packed with equations, tables, and multi-column layouts — can benefit from structured, guided navigation at higher zoom levels. Standard PDF viewers just aren't built for this kind of sustained, focused reading.

RailReader2 solves this with AI-guided rail reading: a layout analysis model (PP-DocLayoutV3) detects text blocks and reading order, then the viewer guides you through the document line by line, block by block. It's not a screen magnifier — it's a purpose-built reading environment that understands document structure.

There is an "AI inception" to the whole project: RailReader2 was built almost entirely with Claude Code, an AI coding agent. So it is an AI agent that wrote the code for an app that itself leverages an AI vision model to function. It's a small example of how AI-assisted development can bring niche, genuinely needed tools into existence when the traditional software market would never justify building them.

A note on accessibility: While RailReader2 includes features that can help readers with visual impairments (colour filters, line focus, high contrast modes), it is primarily designed for comfortable reading at high magnification rather than as a full assistive technology solution. It is not a screen magnifier, and it may not be appropriate for users with severe visual impairments who require dedicated accessibility software with features like screen reader integration, cursor tracking, or system-wide magnification.

Screenshots

railreader2 rendering an academic PDF at full page zoom with sharp text and navigation controls visible
Full page view — vector-sharp rendering at any zoom level
railreader2 showing AI layout analysis overlay with detected text blocks, figures, and reading order numbers on an academic PDF
Layout analysis — AI-detected blocks with reading order
railreader2 rail mode navigating a text block line by line at high magnification with the current line highlighted
Rail mode — line-by-line reading at high magnification
railreader2 line focus dim effect fading non-active lines to reduce distraction during rail reading
Line focus dim — non-active lines faded for focus
railreader2 full-text search with sidebar results panel and highlighted matches on the PDF page
Search — sidebar panel with grouped results and page highlights
railreader2 annotation tools showing highlights, freehand pen marks, rectangles, and text notes on a PDF page
Annotations — highlights, text notes, freehand, and more
railreader2 amber colour filter applied to PDF content via GPU-accelerated shader
Amber colour filter — GPU-accelerated, PDF content only
railreader2 high contrast colour effect combined with rail mode for maximum readability
High contrast + rail — maximum readability

Features

AI Layout Detection

PP-DocLayoutV3 by PaddlePaddle identifies 23 block types (paragraphs, headings, figures, tables, formulas) and predicts reading order automatically. See the technical report.

Rail Mode

Zoom in past the threshold and navigation locks to detected text blocks. Advance line by line with arrow keys or WASD. Hold left/right to scroll continuously with speed ramping.

Auto-Scroll & Speed Control

Toggle continuous horizontal scrolling with the P key or the toolbar button. Hold D or Right to boost speed. Pauses briefly at line and block boundaries for eye settling. Adjust speed via the docked slider toolbar or [ ] keys. Auto-scroll and jump mode are mutually exclusive.

Jump Mode & Line Focus

Press J or the toolbar button to toggle saccade-style jump navigation — advance by a configurable percentage of the visible width. Enable line focus dim (F button) to smoothly fade non-active lines, reducing peripheral distraction. All modes have quick-toggle buttons on the rail toolbar.

Bionic Reading

Shader-based text fading de-emphasises the trailing portion of each word, guiding the eye to fixation points. Toggle with R or the toolbar button. Configurable fixation percentage and fade intensity. Composes with line focus dim and colour effects.

Colour Effects

GPU-accelerated colour filters — amber, greyscale, inverted, high contrast — with adjustable intensity. Per-document: each tab keeps its own effect. Press C to cycle through effects quickly.

Smooth Zoom & Dark Mode

All zoom actions animate smoothly over 180ms with cubic ease-out. Rapid scroll inputs accumulate fluidly. Toggle a dark UI theme in Settings for comfortable use in low-light environments.

High-DPI Rendering

PDF pages are rasterised by PDFium at a DPI proportional to zoom (up to 600 DPI). Pan and zoom are compositor-level transforms — sharp and smooth at any magnification.

Multi-Tab & Outline

Open multiple PDFs in tabs with independent state. Navigate via the table of contents panel or the interactive minimap.

Named Bookmarks

Bookmark any page with a custom name. Navigate to bookmarks from a dedicated panel tab alongside the outline. "Back to previous location" for quick return after jumping. Bookmarks persist across sessions.

Line Highlight Tint

Configurable colour tint on the active line in rail mode — Auto, Yellow, Cyan, Green, or None. Auto adapts to the active colour effect. Adjustable opacity for subtle or prominent highlighting.

Motion Blur

Subtle directional blur during horizontal scroll and uniform blur during zoom for perceptual smoothness. Configurable intensity via Settings, or disable entirely.

Configurable Navigation

Choose which block types are navigable in rail mode. Adjust zoom thresholds, scroll speeds, and snap animation timing. Settings persist across sessions.

Search

Full-text search across all pages in a sidebar panel. Results are grouped by page with text snippets showing matches in context. Click any result to jump to that match. Regex and case-sensitivity toggles. Matches highlighted on the page — navigate with F3 / Shift+F3 or Enter / Shift+Enter.

Annotations

Right-click to open a radial menu with annotation tools — highlight, freehand pen, rectangles, text notes, and eraser. Colour picker for highlight and pen tools. Collapsible popup notes. Select, move, and resize annotations in browse mode. Delete with the Delete key. Undo/redo for all actions. Persist as sidecar files and export into a new PDF.

Text Selection & Copy

Switch to Text Select mode via the floating toolbar to select and copy text from PDF pages. The toolbar provides Browse, Text Select, and Copy buttons with clear visual feedback for the active mode.

AI Agent CLI

A headless agent CLI powered by Microsoft.Extensions.AI lets an LLM open PDFs, navigate, extract text, search, annotate, and export — all via structured tool calls. Works with any OpenAI-compatible API.

Headless Core Library

All business logic lives in a UI-free core library (RailReader.Core) with zero Avalonia dependencies. The desktop app is a thin UI shell. Fully testable — 37 xUnit tests run without a display server.

Getting Started

  1. Download the latest release for your platform from GitHub Releases — an AppImage for Linux or an installer for Windows. The AI layout model is included in both packages.
  2. Linux: Make the AppImage executable (chmod +x railreader2-linux-x86_64.AppImage) and run it. Windows: Run railreader2-setup-x64.exe and follow the installer wizard.
  3. Windows SmartScreen warning: Windows may show a “Windows protected your PC” dialog because the installer is not code-signed. This is normal for open-source software distributed outside the Microsoft Store. To continue: click More info, then Run anyway. If your browser flags the download, choose Keep (Chrome) or Keep anyway (Edge). The full source code is available on GitHub.
  4. Open a PDF with Ctrl+O or pass it as a command-line argument. Zoom in to activate rail mode and start reading.

Keyboard Shortcuts

Key Action
General
Ctrl+OOpen file
Ctrl+WClose tab
Ctrl+TabNext tab
Ctrl+QQuit
Ctrl+,Settings
Ctrl+MToggle minimap
Ctrl+Shift+OToggle outline panel
Ctrl+Shift+BToggle bookmarks panel
F1Keyboard shortcuts
Navigation
PgDn / PgUpNext / previous page
Home / EndFirst / last page
Ctrl+Home / Ctrl+EndFirst / last page (also from menu)
SpaceNext line (rail mode) or next page
View
+ / -Zoom in / out
0Fit page to window
F11Toggle fullscreen
Shift+DToggle debug overlay
Rail Mode
Down / SNext line
Up / WPrevious line
Right / DScroll forward (hold)
Left / AScroll backward (hold)
Home / EndLine start / end
PToggle auto-scroll (D/Right to boost)
JToggle jump mode (saccade-style advance)
BAdd bookmark for current page
` (backtick)Navigate back to previous location
CCycle colour effect on active tab
FToggle line focus dim
RToggle bionic reading
EscapeStop auto-scroll
[ / ]Adjust scroll speed or jump distance
Shift+[ / ]Adjust blur intensity
Search & Annotations
Ctrl+FOpen search panel
F3 / Shift+F3Next / previous match
EscapeStop auto-scroll / close search / cancel tool / exit fullscreen
Right-clickOpen annotation radial menu (colour picker for Highlight/Pen)
Ctrl+ZUndo annotation
Ctrl+YRedo annotation
DeleteDelete selected annotation (browse mode)
Ctrl+CCopy selected text