pdf-annotate.js

WebJar for pdf-annotate.js

License

License

MIT
Categories

Categories

PDF Data
GroupId

GroupId

org.webjars.bowergithub.vimalkumar010
ArtifactId

ArtifactId

pdf-annotate.js
Last Version

Last Version

2.2.2
Release Date

Release Date

Type

Type

jar
Description

Description

pdf-annotate.js
WebJar for pdf-annotate.js
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/vimalkumar010/pdf-annotate.js

Download pdf-annotate.js

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bowergithub.vimalkumar010/pdf-annotate.js/ -->
<dependency>
    <groupId>org.webjars.bowergithub.vimalkumar010</groupId>
    <artifactId>pdf-annotate.js</artifactId>
    <version>2.2.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bowergithub.vimalkumar010/pdf-annotate.js/
implementation 'org.webjars.bowergithub.vimalkumar010:pdf-annotate.js:2.2.2'
// https://jarcasting.com/artifacts/org.webjars.bowergithub.vimalkumar010/pdf-annotate.js/
implementation ("org.webjars.bowergithub.vimalkumar010:pdf-annotate.js:2.2.2")
'org.webjars.bowergithub.vimalkumar010:pdf-annotate.js:jar:2.2.2'
<dependency org="org.webjars.bowergithub.vimalkumar010" name="pdf-annotate.js" rev="2.2.2">
  <artifact name="pdf-annotate.js" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bowergithub.vimalkumar010', module='pdf-annotate.js', version='2.2.2')
)
libraryDependencies += "org.webjars.bowergithub.vimalkumar010" % "pdf-annotate.js" % "2.2.2"
[org.webjars.bowergithub.vimalkumar010/pdf-annotate.js "2.2.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

pdf-annotate.js

Build Status codecov

Annotation layer for PDF.js.

Combined fork of archived instructure/pdf-annotate.js and deleted DynamicEnvironmentSystems/pdf-annotate.js. Under active development for usage within Submitty.

To report issues for pdf-annotate.js, please file them under the Submitty/Submitty repository.

Objectives

  • Provide a low level annotation layer for pdf.js.
  • Optional high level UI for managing annotations.
  • Agnostic of backend, just supply your own StoreAdapter to fetch/store data.
  • Prescribe annotation format.

Example

import pdfjsLib from 'pdfjs-dist/build/pdf';
import PDFJSAnnotate from 'pdfjs-annotate';
import MyStoreAdapter from './myStoreAdapter';

const { UI } = PDFJSAnnotate;
const VIEWER = document.getElementById('viewer');
const RENDER_OPTIONS = {
  documentId: 'MyPDF.pdf',
  pdfDocument: null,
  scale: 1,
  rotate: 0
};

pdfjsLib.workerSrc = 'pdf.worker.js';
PDFJSAnnotate.setStoreAdapter(MyStoreAdapter);

pdfjsLib.getDocument(RENDER_OPTIONS.documentId).promise.then((pdf) => {
  RENDER_OPTIONS.pdfDocument = pdf;
  VIEWER.appendChild(UI.createPage(1));
  UI.renderPage(1, RENDER_OPTIONS);
});

See more examples.

Documentation

View the docs.

Developing

# clone the repo
$ git clone https://github.com/Submitty/pdf-annotate.js.git
$ cd pdf-annotate.js

# intall dependencies
$ npm install

# start example server
$ npm start
$ open http://127.0.0.1:8080

# run tests
$ npm test

# lint the code
$ npm run lint

Versions

Version
2.2.2