Skip to main content
Version: Next

Web

On web, ReadiumView renders with Readium's TypeScript toolkit for EPUB and PDF.js for PDF, through React Native Web.

Serving publications​

The web reader fetches a publication over HTTP instead of opening a file:

What differs from native​

FeatureWeb
SearchNot supported (capabilities.search is false)
Text selectionSupported. The selection menu is drawn by the library rather than the operating system, and a highlight is anchored by its text, so a phrase repeated in a chapter may be decorated at the wrong occurrence; see Highlights
textAlignstart, left, right and justify only — Readium CSS has no value for center or end
ZoomPDF only; onZoomChange reports the scale, including pinches
file.credentials, LCPNot supported: LCP is native only

Use capabilities from onPublicationReady to adapt the UI rather than checking the platform.

Next.js​

The Next.js example shows the setup: React Native Web, and transpilePackages for the library and its dependencies in next.config.js.