# pdf-annotate.js
[](https://github.com/Submitty/pdf-annotate.js/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster)
[](https://codecov.io/gh/Submitty/pdf-annotate.js)
Annotation layer for [PDF.js](https://github.com/mozilla/pdf.js).
Combined fork of archived [instructure/pdf-annotate.js](https://github.com/instructure/pdf-annotate.js/) and deleted DynamicEnvironmentSystems/pdf-annotate.js. Under active development for usage within [Submitty](https://github.com/Submitty/Submitty).
To report issues for pdf-annotate.js, please file them under the [Submitty/Submitty](https://github.com/Submitty/Submitty) repository.
## Objectives
- Provide a low level annotation layer for [PDF.js](https://github.com/mozilla/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
```js
import pdfjsLib from 'pdfjs-dist/build/pdf';
import PDFJSAnnotate from 'pdfjs-annotate';
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(PDFJSAnnotate.LocalStoreAdapter);
pdfjsLib.getDocument(RENDER_OPTIONS.documentId).promise.then((pdf) => {
RENDER_OPTIONS.pdfDocument = pdf;
VIEWER.appendChild(UI.createPage(1));
UI.renderPage(1, RENDER_OPTIONS);
});
```
See [/web](https://github.com/Submitty/pdf-annotate.js/tree/master/web) for an example web client for annotating PDFs.
## Documentation
[View the docs](https://github.com/Submitty/pdf-annotate.js/tree/master/docs).
## Developing
```bash
# 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
```
没有合适的资源?快使用搜索试试~ 我知道了~
pdf-annotate.js:pdf.js的注释层

共140个文件
js:101个
md:12个
html:5个

需积分: 50 1.4k 浏览量
2021-04-29
00:02:20
上传
评论 1
收藏 1.74MB ZIP 举报
pdf-annotate.js 注释层。 合并后的分支和已删除的DynamicEnvironmentSystems / pdf-annotate.js的分支。 下内使用积极发展 。 要报告pdf-annotate.js的问题,请将其提交到存储库下。 目标 为提供一个低层注释层。 可选的高级UI,用于管理注释。 与后端StoreAdapter ,只需提供您自己的StoreAdapter即可获取/存储数据。 规定注释格式。 例子 import pdfjsLib from 'pdfjs-dist/build/pdf' ; import PDFJSAnnotate from 'pdfjs-annotate' ; const { UI } = PDFJSAnnotate ; const VIEWER = document . getElementById ( 'viewer' ) ; c
资源详情
资源评论
资源推荐
收起资源包目录





































































































共 140 条
- 1
- 2




















小子骚骚
- 粉丝: 16
- 资源: 4657

上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- python基础学习资料+配套题目+答案详解
- 倍福Twincat2 Tc211x64Engineering-R3-2.11.2308
- 基于jsp+sql的bbs论坛系统源码
- 图片展示多肉植物图鉴-微信小程序设计源代码【含图文文档教程+源码导入教程+操作界面截图】
- 基于Struts2+Spring+Hibernate+Jsp+Mysql5的项目申报系统源码
- PySD 将Vensim模型转化为Python语言
- Netscan是扫描网络或计算机系统以识别任何潜在漏洞或安全威胁的过程 这可能包括扫描开放端口,检查软件或固件中的已知漏洞
- 拼车同城拼车(完整带PHP后台)-微信小程序设计源代码【含图文文档教程+源码导入教程+操作界面截图】
- 【IrobotQ3D】无人驾驶70码模板 程序
- CreateList.c
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0