pdf-highlighter
v1.1.1
Published
React component for highlighting text in PDF documents.
Downloads
11
Readme
PDF Highlighter
React component for highlighting text in PDF documents.
Installation
npm install pdf-highlighter pdfjs-distUsage
import PdfHighlighter from 'pdf-highlighter';
function App() {
return (
<PdfHighlighter
url="/example.pdf"
highlights={["important", "text"]}
/>
);
}Props
| Prop | Type | Default | Description | |------|------|---------|-------------| | file | File | null | PDF file object | | url | string | null | PDF URL | | highlights | array | [] | Array of phrases to highlight | | spinnerColor | string | "#3b82f6" | Spinner color | | spinnerSize | number | 48 | Spinner size in pixels |
