An enhanced version of react-pdf-js
, which provides a component for rendering PDF documents using PDF.js.
# Yarn
$ yarn add putdotio/react-pdf-js
# NPM
$ npm install putdotio/react-pdf-js --save
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,
};