An example to show PDF file in React with react-pdf-viewer

Here is an example to show PDF in webpage with React-pdf-viewer, including helpful default layout and loading progress bar. import { Viewer, ProgressBar, Worker } from '@react-pdf-viewer/core'; import { defaultLayoutPlugin } from '@react-pdf-viewer/default-layout'; import '@react-pdf-viewer/core/lib/styles/index.css'; import '@react-pdf-viewer/default-layout/lib/styles/index.css'; const PdfViewer = () => { const defaultLayoutPluginInstance = defaultLayoutPlugin(); return ( <div Read more…