All Projects → agentcooper → React Pdf Highlighter

agentcooper / React Pdf Highlighter

Licence: mit
Set of React components for PDF annotation

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Pdf Highlighter

Flutter plugin pdf viewer
A flutter plugin for handling PDF files. Works on both Android & iOS
Stars: ✭ 81 (-81.92%)
Mutual labels:  pdf, pdf-viewer
Document Viewer
Document Viewer is a highly customizable document viewer for Android.
Stars: ✭ 415 (-7.37%)
Mutual labels:  pdf, pdf-viewer
Remarks
Extract highlights, scribbles, and annotations from PDFs marked with the reMarkable tablet. Export to Markdown, PDF, PNG, and SVG
Stars: ✭ 94 (-79.02%)
Mutual labels:  pdf, highlighting
Buka
Buka is a modern software that helps you manage your ebook at ease.
Stars: ✭ 896 (+100%)
Mutual labels:  pdf, pdf-viewer
Pdf Flipbook
Browse PDF document like a book turning its pages
Stars: ✭ 279 (-37.72%)
Mutual labels:  pdf, pdf-viewer
Ng2 Pdf Viewer
📄 PDF Viewer Component for Angular 5+
Stars: ✭ 997 (+122.54%)
Mutual labels:  pdf, pdf-viewer
Vue Pdf
vue.js pdf viewer
Stars: ✭ 1,700 (+279.46%)
Mutual labels:  pdf, pdf-viewer
React Pdf
Display PDFs in your React app as easily as if they were images.
Stars: ✭ 5,320 (+1087.5%)
Mutual labels:  pdf, pdf-viewer
React Native Pdfview
📚 PDF viewer for React Native
Stars: ✭ 198 (-55.8%)
Mutual labels:  pdf, pdf-viewer
Cordova Plugin Document Viewer
A Document Viewer cordova/phonegap plugin for iOS, Android and Windows
Stars: ✭ 168 (-62.5%)
Mutual labels:  pdf, pdf-viewer
Sumatrapdf
SumatraPDF reader
Stars: ✭ 7,462 (+1565.63%)
Mutual labels:  pdf, pdf-viewer
Pdfh5
web/h5/移动端PDF预览插件
Stars: ✭ 423 (-5.58%)
Mutual labels:  pdf, pdf-viewer
React Pdf Js
A React component to wrap PDF.js
Stars: ✭ 489 (+9.15%)
Mutual labels:  pdf, pdf-viewer
Jfbview
PDF and image viewer for the Linux framebuffer.
Stars: ✭ 78 (-82.59%)
Mutual labels:  pdf, pdf-viewer
Pdf2htmlex
Convert PDF to HTML without losing text or format.
Stars: ✭ 472 (+5.36%)
Mutual labels:  pdf, pdf-viewer
Qpdf
PDF viewer widget for Qt
Stars: ✭ 111 (-75.22%)
Mutual labels:  pdf, pdf-viewer
Pdfview Android
Small Android library to show PDF files
Stars: ✭ 132 (-70.54%)
Mutual labels:  pdf, pdf-viewer
Xournalpp
Xournal++ is a handwriting notetaking software with PDF annotation support. Written in C++ with GTK3, supporting Linux (e.g. Ubuntu, Debian, Arch, SUSE), macOS and Windows 10. Supports pen input from devices such as Wacom Tablets.
Stars: ✭ 5,353 (+1094.87%)
Mutual labels:  pdf, pdf-viewer
Pdfvuer
A PDF viewer for Vue using Mozilla's PDF.js
Stars: ✭ 443 (-1.12%)
Mutual labels:  pdf, pdf-viewer
Rst2pdf
Use a text editor. Make a PDF.
Stars: ✭ 404 (-9.82%)
Mutual labels:  pdf

☕️ Buy me a coffee

Node CI

react-pdf-highlighter

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 server.

Example (Create React App)

For online example check https://agentcooper.github.io/react-pdf-highlighter/.

To run the example app locally:

npm install
npm start

While docs are in progress, feel free to check the source annotated with Flow type signatures.

Installation

npm install react-pdf-highlighter

See packages/example/src/App.js for React component API example.

Prior art

react-pdf and react-pdfjs only provide React wrappers for PDF.js and do not have built-in annotation functionality.

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.

See also:

FAQ

Can I get a new PDF with the highlights embedded into the document?

No, but pdf-annotation-service might be helpful for you.

Wasn't this named react-pdf-annotator at some point?

Yes, but people from https://www.pdfannotator.com/ asked me to rename, since they have a trademark for PDF Annotator.

I'm trying the demo with my PDF and it is not loading!

Please check the CORS headers on your url. It is required for the cross-domain request.

Compatibility

Works in Google Chrome, Safari 10+, Firefox 52+. Not tested in Internet Explorer.

Contributing

To publish a new version:

npx lerna version

cd ./packages/react-pdf-highlighter
npm publish

PDF.js worker thread

The default worker is an inline "fake" worker. To improve performance, either add the worker-loader (preferred) to your webpack config or use the inline loader syntax.

Webpack config example snippet

Use this if have your own config

{
  ...
  module: {
    rules: [
      {
        test: /\.worker\.js$/,
        use: 'worker-loader',
      },
      ...
    ]
  }
}

Inline Webpack-loader syntax

Use in Create React App projects

import PDFWorker from "worker-loader!pdfjs-dist/lib/pdf.worker";

import {setPdfWorker} from 'react-pdf-highlighter';

setPdfWorker(PDFWorker);
...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].