A light component to preview pdf files, offer toolbox with pager, zoomer and download, etc.
light-pdf-viewer
is dependant on pdfjs-dist
so make sure you have installed it in advance.
npm install --save pdfjs-dist@1.9.456
npm install --save react-light-pdf-viwer
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import PDFViewer from 'react-light-pdf-viewer';
ReactDOM.render(
<PDFViewer URI="URI or dataurl of your pdf" />,
document.getElementById('root')
);