rl-react-pdf

1.0.24 • Public • Published

This is a sample react pdf reader with annotation

Usage

import PDFReader from "rl-react-pdf"

const handleSelectArea = (position) => {
    // SAMPLE 'POSITION' OBJECT STRUCTURE
    //  position = {
    //     boundingRect: {
    //       x1: 255.73419189453125,
    //       y1: 139.140625,
    //       x2: 574.372314453125,
    //       y2: 165.140625,
    //       width: 809.9999999999999,
    //       height: 1200
    //     },
    //     rects: [
    //       {
    //         x1: 255.73419189453125,
    //         y1: 139.140625,
    //         x2: 574.372314453125,
    //         y2: 165.140625,
    //         width: 809.9999999999999,
    //         height: 1200
    //       }
    //     ],
    //     pageNumber: 1
    //   }
}
<PDFReader url={"LOCATION/TO/PDF"} onSelectArea={handleSelectArea} />

Readme

Keywords

none

Package Sidebar

Install

npm i rl-react-pdf

Weekly Downloads

0

Version

1.0.24

License

ISC

Unpacked Size

27.5 kB

Total Files

11

Last publish

Collaborators

  • datapractice