Migrated repository
Go to file
2020-09-24 11:50:27 +08:00
.github Create FUNDING.yml 2020-09-17 19:19:41 +08:00
public 修复了一个图片签章漏掉的赋值代码,将按钮的ofd文件内置到src中了方便测试 2020-09-22 14:07:49 +08:00
src background:#F5F5F5; 2020-09-24 11:50:27 +08:00
.gitignore readme 2020-09-11 13:28:21 +08:00
.npmignore npmignore 2020-09-22 10:00:17 +08:00
babel.config.js init 2020-09-09 18:46:28 +08:00
LICENSE 协议 2020-09-10 15:45:18 +08:00
ofd.jpg 效果图 2020-09-22 17:48:12 +08:00
package.json npm配置 2020-09-23 14:19:34 +08:00
README.md npm配置 2020-09-23 14:19:34 +08:00
vue.config.js publicPath 2020-09-19 18:01:21 +08:00

ofd.js

- license

目前方案采用svg及canvas渲染实现百分百纯前端渲染

效果: 示例

体验地址

Usage with npm

npm i ofd.js
import {parseOfdDocument, renderOfd} from "ofd.js";
其中ofd传入的file支持本地文件、二进制或者url、screenWidth为屏幕宽度
parseOfdDocument({
        ofd: file,
        success(res) {
          //输出ofd每页的div
          const divs = renderOfd(screenWidth, res);
          //获取签章div的信息, 具体看demo
          for(let ele of document.getElementsByName('seal_img_div')) {
             this.addEventOnSealDiv(ele, JSON.parse(ele.dataset.sesSignature), JSON.parse(ele.dataset.signedInfo));
          }
        },
        fail(error) {
          console.log(error)
        }
      });

愿景

希望能做到pdf.js的高度

ofd推荐项目

OFD Reader & Writer

参与贡献

发挥人人为我我为人人的优良传统多做pr~~~

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

项目关注度

项目获得 Star曲线

Stargazers over time