prm-react-pdf-viewer
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

prm-react-pdf-viewer

react pdf viewer along with text annotation, rectangle draw annotation

NPM JavaScript Style Guide

Install

npm install --save prm-react-pdf-viewer

Usage

import React, { Component } from 'react'

import { IPdfViewer, PdfViewer, PdfViewerOption } from 'prm-react-pdf-viewer'
import 'prm-react-pdf-viewer/dist/index.css'

class Example extends Component {
  const annotations =  [{ pageNumber:2, id:"1", quads:[{left:300, right:750, top: 1685, bottom: 1745}], pageResolution:{width: 4426,   height: 6138}, extraInfo:{showPopup: true, value: 'Abc'}}];
  
  const [pdfOptions, setPdfOption]= useState<PdfViewerOption>({
          docUrl:"/myPdf.pdf",
          annotations:annotations,
          initialZoomPercentage:50,
          color: {r:0, g:255, b: 0}
        }) ;
  render() {
    return <PdfViewer options={pdfOptions} onDocLoad={onDocLoad} />
  }
}

License

MIT © Subhendu1990

Readme

Keywords

none

Package Sidebar

Install

npm i prm-react-pdf-viewer

Weekly Downloads

4

Version

1.1.4

License

MIT

Unpacked Size

569 kB

Total Files

22

Last publish

Collaborators

  • tectes