R2D2BC is an implementation of the Readium v2 EPUB and PDF reader for the web. It is built as a modular toolkit (rather than a full-featured app) so that applications can use it to handle publication-related functions while customizing their own design, user interface, and extensions.
- Follow the Readium architecture specification for best interoperability
- Allow maximum configurability via API methods, callbacks, code and style injection, and clear separation of functions
- Modularity
- Clarity of code and ease of maintenance
- Speed
- Accessibility
- Free and open source
The R2D2BC project intentionally includes only a bare-bones demonstration user interface, and no sample content. Any implementer can add their own functionality and design without refactoring the whole project.
- EPUB Reflowable + Fixed Layout
- PDF (via pdfjs-dist v5)
- Reader Settings (font, size, spacing, colors, layout, margins)
- Configurable Modules with Callbacks
- Injectable Fonts, CSS, JavaScript
- Text Selection with Injectable Context Menu
- Bookmarks
- Highlights (configurable colors)
- Annotations
- TTS - Text to Speech / Read Aloud
- Media Overlays - Read Along (with click-to-advance)
- Search
- Content Protection
- Definitions
- Popup Footnotes
- Page Breaks - Page Numbers in margin
- Sample Read
- Timeline
- Consumption Tracking
- Layers
- Line Focus
- History Navigation
- Citations
This project implements most components of the Readium Architecture:
- Implements Locator
- Implements UserSettings
- Implements Webpub Manifest
- Implements the Readium shared models
- Integrates Readium CSS v1.1.1
- Implements Navigator for reflowable and fixed-layout publications
- Implements PDF Navigator (pdfjs-dist v5)
Here is the original proposal, initiated by Aferdita Muriqi to the Readium Weekly Eng Meeting - 05/22/2019
Subsequent development of R2D2BC has been supported by DITA, Bokbasen, and CAST - which explains the D2, B, and C in the name.
The R2D2BC reader has been used in:
- The Clusive learning environment
- Bokbasen's Allbok.no
- Allvir's Allvit.no Reading Platform
- The UNODC Fieldguides
- The DITA Gateway D2G with several open collections
- Ekitabu's Web Reader Implementations through Dita Gateway
- NYPL's Web Reader Implementations
- Bibliotheca's CloudLibrary as Sample Reader and Full ePub Reader
- Above the Treeline's Edelweiss+
- Bluefire's Web Reader Implementations
- and more...
npm install
npm run build && npm run examplesThen visit http://localhost:4444/. The landing page shows available publications and example viewers.
Examples are included for React, Vue, Angular, Next.js, Remix, and Vanilla JS:
npm run example:react
npm run example:vue
npm run example:angular
npm run example:vanillaSee examples/README.md for full details.
Contributions are always welcomed! Please see CONTRIBUTING for detailed guidelines.

