a PDF viewer made for React
written in TypeScript • plugin architecture • requires React 16.8+
// Core viewer
import { Viewer } from '@react-pdf-viewer/core';
// Plugins
import { defaultLayoutPlugin } from '@react-pdf-viewer/default-layout';
// Import styles
import '@react-pdf-viewer/core/lib/styles/index.css';
import '@react-pdf-viewer/default-layout/lib/styles/index.css';
// Create new plugin instance
const defaultLayoutPluginInstance = defaultLayoutPlugin();
<Viewer
fileUrl='/assets/pdf-open-parameters.pdf'
plugins={[
// Register plugins
defaultLayoutPluginInstance,
...
]}
/>
You can drag a PDF file and drop to the demo area above
Open file
Support password protected document
Open a file from the toolbar or drag and drop to the viewer
Text
User can select and copy text inside the document
It's also possible to search for given keyword
Navigation
React PDF Viewer supports different ways to navigate between document sections by following:
table of contents
pages thumbnail
bookmark
Customization
The toolbar can be customized easily
Localization
All text items can be localized in another language
Coming soon Theming • Darkmode
Purchase