Intelllex React PDF
npm install rl-react-intellix-pdf
npm install @intelllex/react-pdf
`
or
`
yarn add @intelllex/react-pdf
`
How to use
`js
import React from 'react';
import ReactPDF from '@intelllex/react-pdf';
const ExampleReactPDF = () => {
return (
url={this.props.url ? this.props.url : 'http://localhost:3015/src/assets/Visa%20Credit%20Card%20Agreement.pdf'}
showProgressBar
showToolbox
searchTerm = {this.props.searchTerm}
/>
)
};
export default ExampleReactPDF;
`
Documentation
React component prop. types:
- url
- Type: _String_
- Required: true
- Description: The URL of PDF Document you want to display.
- showProgressBar
- Type: _Boolean_
- Required: false
- Description: Show progress bar on top when loading PDF Document
- showToolbox
- Type: _Boolean_
- Required: false
- Description: Show the useful toolbox on PDF Pages
- onChangePage
- Type: _Function_
- Required: false
- Description: Callback with page param when changing Page Number
- onZoomIn
- Type: _Function_
- Required: false
- Description: Callback when clicking on Zoom In button
- onZoomOut
- Type: _Function_
- Required: false
- Description: Callback when clicking on Zoom Out button
- onProgress
- Type: _Function_
- Required: false
- Description: Callback with progress param when loading PDF
- onToggleThumbnail
- Type: _Function_
- Required: false
- Description: Callback with isShowThumbSidebar` param when toggling Thumbnail sidebar