# react-better-pdf

> Rendering PDF by pdf.js, including lazy loading and page jump

Latest version **0.0.4** (published 2019-02-22) · MIT license · 2 weekly downloads

## Install

```sh
npm install react-better-pdf
pnpm add react-better-pdf
yarn add react-better-pdf
bun add react-better-pdf
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score; declining downloads.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2019-02-22 |
| First published | 2019-02-21 |
| Weekly downloads | 2 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 9.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | savoygu |

## Links

- npm: https://www.npmjs.com/package/react-better-pdf
- Repository: https://github.com/fake-car/ReactPdf/reactPdf
- npm.io page: https://npm.io/package/react-better-pdf

## Dependencies (2)

- [pdfjs-dist](https://npm.io/package/pdfjs-dist.md) ^2.0.943
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2

## Recent versions

- 0.0.4 (latest) — 2019-02-22
- 0.0.3 — 2019-02-21

## README

# @umi-material/reactPdf

Rendering PDF by pdf.js, including lazy loading and page-jump

## Usage

Install with yarn add react-better-pdf or npm install react-better-pdf

    import React, { Component } from 'react'
    import ReactPdf from 'inter-reactpdf'

    class index extends Component {

      onPdfLoaded = () => {
        console.log('pdf loaded')
      }

      render() {
        return (
          <ReactPdf
            url='your pdf data url'
            onPageChange={(currentPage, totalPageNum)}
            onPdfLoaded={this.onPdfLoaded}
            maxWidth={1440}
            worker={'https://xxx.worker.js'} // default is pdf.worker.js
          />
        )
      }
    }

export default index

## LICENSE

MIT

---
_Source: https://npm.io/package/react-better-pdf · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
