A Tauri desktop PDF bilingual reader with sentence-level alignment and translation.
Reading technical PDFs in another language is slow. PDFRead keeps the original PDF on the left and sentence-level translations on the right, so you can scan and compare without losing your place.
- Two-column layout: PDF on the left, translations and controls on the right.
- Sentence-level translation with aligned highlights on the PDF.
- Read-only Slate rendering for clean, consistent text.
- Virtualized translation list for long documents.
- Local JSON cache for translations (no repeated costs).
- PDF rendering: pdf.js (
pdfjs-dist/legacy/build/pdf.mjs) with text layer overlays. - Sentence extraction: single-column heuristic in
src/lib/textExtraction.ts. - Translation pipeline: frontend -> Tauri command -> OpenRouter -> cache.
- Cache keys: docId + sid + source text hash + model + target language.
brew update && brew tap everettjf/tap && brew install --cask pdfreadbun install
bun run tauri devbun run build- Open a PDF.
- Select target language and model.
- Hover or click a sentence to highlight corresponding regions in the PDF.
- Translations are cached locally for fast repeat access.
- Theme: system / light / dark
- Translation mode:
- Window: current page ± radius
- Chunk: translate by page blocks
- Debounce: 400ms; concurrency: 1; stale responses ignored
src/components/PdfViewer.tsx: PDF list and navigationsrc/components/PdfPage.tsx: PDF page rendering and highlightssrc/components/TranslationPane.tsx: Translation UI (Slate read-only)src/lib/textExtraction.ts: Sentence extractionsrc-tauri/src/lib.rs: OpenRouter translation command
- VS Code + Tauri extension + rust-analyzer
