ofd.js/README.md
2020-09-15 18:00:01 +08:00

66 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ofd.js
![-](https://img.shields.io/badge/language-js-orange.svg) [![license](https://img.shields.io/badge/license-Apache--2.0-blue)](./LICENSE)
目前方案采用svg及canvas渲染实现百分百纯前端渲染
效果:
![示例](./ofd.jpg)
[体验地址](https://51shouzu.xyz/ofd/)
## 接口使用(暂时提供)
```
其中ofd传入的file支持本地文件或二进制、screenWidth为屏幕宽度
parseOfdDocument({
ofd: file,
success(res) {
//输出ofd每页的div
const divs = renderOfd(screenWidth, res);
},
fail(error) {
console.log(error)
}
});
```
## 愿景
希望能做到pdf.js的高度
## ofd推荐项目
[OFD Reader & Writer](https://github.com/Trisia/ofdrw)
## 参与贡献
发挥人人为我我为人人的优良传统多做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](https://cli.vuejs.org/config/).
### 项目关注度
> 项目获得 Star曲线
[![Stargazers over time](https://starchart.cc/DLTech21/ofd.js.svg)](https://starchart.cc/DLTech21/ofd.js)