Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agentcooper/react-pdf-highlighter

Set of React components for PDF annotation
https://github.com/agentcooper/react-pdf-highlighter

annotator highlighting pdf pdf-viewer react

Last synced: about 1 month ago
JSON representation

Set of React components for PDF annotation

Awesome Lists containing this project

README

        

☕️ [Buy me a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SC4D2NS8G2JJ8&source=url)

![Node CI](https://github.com/agentcooper/react-pdf-highlighter/workflows/Node%20CI/badge.svg)

# react-pdf-highlighter

Set of React components for PDF annotation.

Features:

- Built on top of PDF.js
- Text and image highlights
- Popover text for highlights
- Scroll to highlights

## Importing CSS

The bundled CSS include the CSS for pdfjs.

```tsx
import "react-pdf-highlighter/dist/style.css";
```

## Example

See demo https://agentcooper.github.io/react-pdf-highlighter/.

To run the example app locally:

```bash
npm install
npm start
```

## Install

```bash
npm install react-pdf-highlighter
```

## How to use

See [`./example/src/App.tsx`](https://github.com/agentcooper/react-pdf-highlighter/blob/main/example/src/App.tsx) for the React component API example.