The purpose of this library is to provide a React component that works as a PDF Reader. It's basically a React wrapper from the pdf.js library from Mozilla.
The library can be installed via the following commands:
npm i --save-dev react-view-pdfBecause this library uses components from precise-ui, it is necessary to add it as a dependency to your project:
npm i precise-uiThen, simply import the component like below:
import { PDFViewer } from 'react-view-pdf';
<PDFViewer url="http://www.africau.edu/images/default/sample.pdf" />Feel free to contribute to it or open issues in case of bugs.
- Remove dependency on
precise-ui. - Allow selection of texts.
- Add built-in download button.