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

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. Hold Ctrl to temporarily free-pan and zoom without rail constraints — release to snap back. Zooming preserves your reading position within the current line.

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.

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.

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 — narrow blocks like equations and headings get proportional dwell time. Scroll speed is zoom-independent, so reading pace stays consistent at any magnification. Adjust speed via the docked slider toolbar, [ / ] keys (±5), or Ctrl+[ / ] for fine adjustments (±1). 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. Toggle the line highlight independently with the H key. All modes have quick-toggle buttons on the rail toolbar.

Colour Effects

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

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.

Configurable Navigation

Choose which block types are navigable in rail mode and which are horizontally centered when narrow. Adjust zoom thresholds, scroll speeds, and snap animation timing. Hold Down/S at the last line of a page to advance to the next page automatically. Settings persist across sessions.

Margin Cropping

Eliminate wasted whitespace by fitting the viewport to the detected content area instead of the full page. Computed from layout analysis, so it adapts per document and never clips content. Toggle with Ctrl+Shift+M.

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.

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.

Copy as LaTeX

Send any detected equation, table, or figure to a Vision Language Model and copy the result to the clipboard. Equations become LaTeX, tables become Markdown, figures get a description. Works with cloud APIs (OpenAI gpt-4.1-mini recommended for accuracy) or local models for privacy. See the setup guide for all options.

Multi-Tab & Sidebar

Open multiple PDFs in tabs with independent state. The tab bar scrolls horizontally and provides a dropdown when many tabs are open. Navigate via the table of contents panel, the interactive minimap, or the figures panel — a browsable index of all detected figures, tables, and equations with thumbnails and extracted text. In fullscreen, the tab bar and status bar auto-hide and reveal on hover at the screen edges.

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.

Annotations

Right-click to open a three-ring radial menu — tool selection (inner), stroke thickness with size-varied circles (middle), and colour picker (outer). Highlight, freehand pen, rectangles, text notes, and eraser. Pen and rectangle tools offer thin, normal, and thick stroke widths. Colour palettes for highlight, pen, and rectangle. Annotations render in z-order: highlights below strokes, text notes on top. Select, move, and resize in browse mode. Undo/redo for all actions. Export into a new PDF or as JSON. Import from other users via File → Import Annotations.

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.

Motion Blur

Subtle directional blur during horizontal scroll (including auto-scroll) and uniform blur during zoom for perceptual smoothness. Adjustable via Shift+[ / ] or Ctrl+Shift+[ / ] for fine control. Configurable intensity via Settings, or disable entirely.

Diagnostic Logging

A session log file captures all activity for troubleshooting. Export via Help → Export Diagnostic Log, or copy the log file path from the About dialog to attach to bug reports.

Headless Core Library

All business logic lives in a rendering-agnostic core library (RailReader.Core) with zero Avalonia or SkiaSharp dependencies. A separate RailReader.Renderer.Skia project implements rendering interfaces. Fully testable — 101 xUnit tests run without a display server. A standalone CLI tool leverages the same core for headless rendering, structure extraction, annotation export, and batch VLM transcription of equations, tables, and figures.

Getting Started

  1. Windows (Microsoft Store): Install directly from the Microsoft Store for automatic updates, no SmartScreen warnings, and clean install/uninstall. Note: the Store release may lag behind the GitHub release by a few days due to certification review.
  2. Windows (standalone) or Linux: Download the latest release from GitHub Releases — an AppImage for Linux or an installer for Windows. The AI layout model is included in all packages.
  3. Linux: Make the AppImage executable (chmod +x railreader2-linux-x86_64.AppImage) and run it. Windows (standalone): Run railreader2-setup-x64.exe and follow the installer wizard.
  4. Windows SmartScreen warning (standalone installer only): Windows may show a “Windows protected your PC” dialog because the standalone installer is not code-signed. This does not apply to the Microsoft Store version. 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.
  5. Open a PDF with Ctrl+O or pass it as a command-line argument. Zoom in to activate rail mode and start reading.

Advanced: A standalone headless CLI for automated batch extraction is also available from GitHub Releases.

Keyboard Shortcuts

Key Action
General
Ctrl+OOpen file
Ctrl+WClose tab
Ctrl+TabNext tab
Ctrl+QQuit
Ctrl+,Settings
Ctrl+MToggle minimap
Ctrl+Shift+MToggle margin cropping
Ctrl+Shift+OToggle outline panel
Ctrl+Shift+BToggle bookmarks panel
Ctrl+Shift+IToggle figures panel
Ctrl+LCopy block as LaTeX (VLM)
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
HToggle line highlight
Ctrl+DragFree pan/zoom in rail mode (release to snap back)
EscapeStop auto-scroll
[ / ]Adjust scroll speed or jump distance (±5)
Ctrl+[ / ]Fine adjust speed or jump distance (±1)
Shift+[ / ]Adjust blur intensity (±0.05)
Ctrl+Shift+[ / ]Fine adjust blur intensity (±0.01)
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 (thickness + colour rings)
Ctrl+ZUndo annotation
Ctrl+YRedo annotation
DeleteDelete selected annotation (browse mode)
Ctrl+CCopy selected text