/PdfViewer-react-pdf.js

A React component to wrap Mozilla's PDF.js with Text layer and Annotation layer, with pagination and fullcsreen mode, link opens in new tab.

Primary LanguageTypeScript

PdfViewer-react-pdf.js📄

Build Status Latest Stable Version GitHub stars GitHub All Releases GitHub code size in bytes GitHub last commit

A React component to wrap Mozilla's PDF.js with Text layer and Annotation layer, with pagination and fullcsreen mode, link opens in new tab.

You can see working DEMO on github pages https://nataliship.github.io/PdfViewer-react-pdf.js/

Usage

Props:

src - link to your pdf file (absolute or relative) or prf file in base64 encoding

sandbox - boolean flag to enable sandbox mode for development (you can download any pdf)

import PdfViewer from './PdfViewer/PdfViewer'
...

<PdfViewer sandbox />  
<PdfViewer src={your_src} />
...

Alt text