GithubHelp home page GithubHelp logo

hdz2014 / ofd.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dltech21/ofd.js

0.0 0.0 0.0 29.89 MB

ofd在线渲染方案

License: Apache License 2.0

JavaScript 90.80% HTML 0.18% Vue 8.84% CSS 0.18%

ofd.js's Introduction

ofd.js

在使用ofd.js前请务必悉知 《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

ofd.js's People

Contributors

dltech21 avatar roy19831015 avatar hdz2014 avatar iandjava avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.