A book reader for the browser build with react
npm install browser-book-reader 
React component that allows you to set a PDF reader in your website with some features like: Read PDF in black mode, expand the PDF to fullscreen, download the file and bookmark it.
* TypeScript 4
* Linting with typescript-eslint (tslint is deprecated)
* Testing with Testing-library
* Continuous integration (GitHub Actions)
* Docs with Storybook TypeDoc
bash
npm i browser-book-reader
Or
yarn add browser-book-reader
...
`
$3
Here's an example of basic usage:`javascript
import React from 'react';
import { BookReader } from 'browser-book-reader'; function myApp() {
const onDownload = () => {
// do something
};
return (
file="somefile.pdf"
mode="full"
onDownload={onDownload}
/>
)
}
`User guide
$3
Displays a reader of a file.|Prop name|Description|Default value|Example values|
|----|----|----|----|
file|The PDF that will be display in the reader. The file can be an url or a file imported (imported using import ... from ... or from file input form element)|n/a|
- URL:
"http://example.com/sample.pdf"File:
import sample from '../static/sample.pdf' and then
sampleParameter object:
{ url: 'http://example.com/sample.pdf', httpHeaders: { 'X-CustomHeader': '40359820958024350238508234' }, withCredentials: true }`|