react-pdf-highlighter is a React library that provides annotation experience for PDF documents on web. It is built on top of PDF.js by Mozilla. Text and rectangular highlights are supported. Highlight
data format is independent of the viewport, making it suitable for saving on the
To run the example app locally:
npm install npm start
Create React App example is available in
./create-react-app-example. Make sure to run
npm install there as well.
npm install react-pdf-highlighter
for React component API example.
pdfjs-annotate does not
provide text highlights out of the box.
PDF.js provides only viewer:
PDF.js is mainly written for reading PDF files, not editing them. Because of that we don’t yet support adding any kind of annotations. We do however support rendering a number of annotation types for viewing.