audio-player-react

1.0.10 • Public • Published

react-pdf-previewer

display pdf in canvas

NPM JavaScript Style Guide

Install

npm install --save react-pdf-previewer

Usage

import React, { Component } from 'react'
 
import MyComponent from 'react-pdf-previewer'
 
class Example extends Component {
  const pdf = '' //base64 format
  const [page,setPage] = React.useState(1)
  const [scale,setScale] = React.useState(1)
  
  const onSuccessLoad = (data) => {
  //pdf details
  }
 
  render () {
    return (
      <MyComponent pdf={pdf} scale={scale} pageNum={page} onLoad={onSuccessLoad} />
    )
  }
}

License

MIT © abidhkm

Readme

Keywords

none

Package Sidebar

Install

npm i audio-player-react

Weekly Downloads

1

Version

1.0.10

License

MIT

Unpacked Size

98.5 kB

Total Files

6

Last publish

Collaborators

  • abidhkm