Code Monkey home page Code Monkey logo

ofdrw's Introduction

OFD Reader & Writer

- Maven Central license

在使用OFDRW前,请务必悉知 《OFD Reader & Writer免责声明》

若clone和文档预览存在困难,请移步 https://gitee.com/ofdrw/ofdrw

Talk is cheap,Show me the code. ——Linus Torvalds

OFD Reader & Writer 开源的OFD处理库,支持文档生成、数字签名、文档保护、文档合并、转换、导出等功能。

本项目采用Apache 2.0许可,请尊重开源项目作者,在软件中附带OFDRW开源软件许可,在遵守开源协议前提下可免费商业化使用

根据《GB/T 33190-2016 电子文件存储与交换格式版式文档》标准实现版式文档OFD库(含有书签)。

项目采用Maven模块管理,各模块如下:

注:

  • 您可以根据需求裁剪模块优化程序体积。
  • 您可以仅引用ofdrw-core中定义的数据结来构建属于您自己的OFD库,就像ofdrw-graphics2d那样。

QuickStart

Maven项目引入依赖

<dependency>
  <groupId>org.ofdrw</groupId>
  <artifactId>ofdrw-full</artifactId>
  <version>2.2.6</version>
</dependency>

OFDRW 将持续保证API的向下兼容,您可以放心的升级OFDRW库至最新版本。

  • 若您没有采用Maven管理项目,请参阅项目中pom.xml文件中的依赖,手动解决三方依赖包问题。
  • 若出现NoClassFound等错误,请检查相关包是否存在冲突。

如何生成一份OFD文档,如何把大象放入冰箱?

public class HelloWorld {
    public static void main(String[] args) throws IOException {
        Path path = Paths.get("HelloWorld.ofd");
        try (OFDDoc ofdDoc = new OFDDoc(path)) {
            Paragraph p = new Paragraph("你好呀,OFD Reader&Writer!");
            ofdDoc.add(p);
        }
        System.out.println("生成文档位置: " + path.toAbsolutePath());
    }
}

效果如下:

示例

相关文档目录:

相关解决方案

HTML5

HTML5前端预览解决方案: DLTech21/ofd.js . https://github.com/DLTech21/ofd.js

  • jszip解压。
  • fast-xml-parser解析xml为json数据。
  • svgcanvas渲染实现。
  • 完全浏览器OFD页面渲染。

开源阅读器

XilouReaderchingliu/XilouReader . https://gitee.com/chingliu/XilouReader

  • 基于pdfium的ofd/pdf双引擎版式阅读器。

OfdiumExroy19831015/OfdiumEx . https://github.com/roy19831015/OfdiumEx

  • 基于cairo库渲染OFD。
  • Windows客户端阅读器

图片转换

目前已经被合并到ofdrw-converter 模块

推荐开源OFD图片转换解决方案: QAQtutu/ofdbox . https://github.com/QAQtutu/ofdbox

  • 支持OFD解析。
  • 基于java.awt解析OFD实现图片绘制。

阅读器

阅读器方面,您也可以尝试:

源码安装

支持 JDK 1.8 及以上版本构建。

在项目根目录下运行:

mvn install

就可以完成项目的构建打包,安装到本地Maven仓库中。

社区交流

Share and Communicate

为方便社区建设与交流,提供社区QQ群:
  • 05群号: 762837395
  • 04群号: 690642037(满)
  • 03群号: 717320255(满)
  • 02群号: 745517934(满)
  • 01群号: 577682453(满)

  • 若您遇到与OFD相关的技术问题,欢迎进群交流!
  • 若您对项目有建设性意见或方案欢迎提交IssuePull Request

参与贡献

参与贡献代码尽量遵守下面代码规约:

  1. 原则上禁止public方法、类、接口进行删除:为了保留向下兼容性,如果是更新升级请标注过去已经暴露方法、接口、类为过时标记@Deprecated,并注释置新的实现位置@deprecated {@link SomethingNew}
  2. 请为每个public方法、类、接口添加注释:为了保留开发者的便利性,注释一般为多行注释,注释内容需要包含参数以及方法或类的作用、参数意义、返还值以及意义、异常抛出、以及参数意义。

>> GitHub 第一次参与开源(多语言)

项目情况

进展

>> 项目进展

在OFDRW 2.0.0之后,项目进展以发布说明的方式在项目托管仓库中描述。

项目关注度

项目获得 Star曲线

Stargazers over time

ofdrw's People

Contributors

trisia avatar dltech21 avatar humingzhang avatar yuanfangme avatar qaqtutu avatar dependabot[bot] avatar iandjava avatar xzxiaoshan avatar roy19831015 avatar dwflzxj avatar nightslight-hub avatar gardelll avatar juntt avatar libra19911018 avatar xiaobaogeit avatar alex-1201 avatar nearzk avatar xiangyanggong avatar marviniter avatar maimai1205 avatar chi-cat avatar leonsu7774 avatar littletain avatar wangshiqiao125 avatar benjinus avatar 1995zwd 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.