Skip to content

horiuchie/react-pdf-js

 
 

Repository files navigation

react-pdf-js

An enhanced version of react-pdf-js, which provides a component for rendering PDF documents using PDF.js.

Installation

# Yarn
$ yarn add putdotio/react-pdf-js

# NPM
$ npm install putdotio/react-pdf-js --save

Usage

There is a basic example on examples folder, which is also live here.

propTypes = {
  content: React.PropTypes.string,
  documentInitParameters: React.PropTypes.shape({
    url: React.PropTypes.string,
  }),
  binaryContent: React.PropTypes.shape({
    data: React.PropTypes.any,
  }),
  file: React.PropTypes.any,
  loading: React.PropTypes.any,
  page: React.PropTypes.number,
  scale: React.PropTypes.number,
  rotate: React.PropTypes.number,
  onContentAvailable: React.PropTypes.func,
  onBinaryContentAvailable: React.PropTypes.func,
  binaryToBase64: React.PropTypes.func,
  onDocumentComplete: React.PropTypes.func,
  onPageComplete: React.PropTypes.func,
  onPageRender: React.PropTypes.func,
  className: React.PropTypes.string,
  style: React.PropTypes.object,
};

Packages

No packages published

Languages

  • JavaScript 95.1%
  • HTML 3.8%
  • CSS 1.1%