Turning Obsidian Into an E-Book Reader: A foliate-js + PDF.js Breakdown
vista8 · x · 2026-09-14
A developer shares the full architecture for turning Obsidian into an e-book reader: vault files → format routing → Foliate.js / PDF.js → unified reading UI → Markdown notes and AI context.
- foliate-js is the core: renders EPUB, MOBI, AZW3, FB2, CBZ and more, with pagination, TOC, CFI locations, full-text search, highlight overlays and reading progress — far better than epub.js, per the author; it comes from an e-reading company and has 1.1k GitHub stars
- PDF parsing via pdfjs; image-only PDFs rendered as-is; bundled Adobe CMaps fix Traditional Chinese/Big5 text extraction
- Reading state, highlights and notes live in the plugin's vault state, not browser IndexedDB
- Obsidian API handles file access, view lifecycle, Markdown rendering and note writing; icons via Lucide
- Fun detail: foliate-js was discovered by simply asking an AI one extra question about mature e-book parsing frameworks
More from coding & agent
- Amazon paper: LLM judges rate 57.5% of failed agent tasks as satisfactory, flip close rankings 31% of the time — dair_ai · 2026-09-14
- Building a Claude Code Template Library for Expert-Level Direct-Response Pages — boringmarketer · 2026-09-14
- Scale AI: task-agnostic agent exploration builds reusable artifacts that cut later inference costs — ScaleAI · 2026-09-14
- TRACE: training-free evidence ordering cuts latency and memory for GUI agents — Yuhao Wang · 2026-09-14
- Secret scan on tool args: a practical cheatsheet for stopping agent key leaks — blaizedsouza · 2026-09-14
- Builder creates a playable AI startup simulator with Tencent Hunyuan Hy4 Preview (770B/A49B) — VibeMarketer_ · 2026-09-14