Giter Club home page Giter Club logo

poi-tl-ext's Introduction

poi-tl-ext

GitHub JDK

Maven

poi 4.x poi-tl 1.11 以前的版本

<dependency>
    <groupId>io.github.draco1023</groupId>
    <artifactId>poi-tl-ext</artifactId>
    <version>0.4.0</version>
</dependency>

poi 5.x poi-tl 1.11.0+

<dependency>
    <groupId>io.github.draco1023</groupId>
    <artifactId>poi-tl-ext</artifactId>
    <version>0.4.0-poi5</version>
</dependency>

扩展功能

poi-tl 的基础上扩展了如下功能:

  • 支持渲染HTML字符串,插件HtmlRenderPolicy的使用方法如下(也可参考文档

    HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
    Configure configure = Configure.builder()
            .bind("key", htmlRenderPolicy)
            .build();
    Map<String, Object> data = new HashMap<>();
    data.put("key", "<p>Hello <b>world</b>!</p>");
    XWPFTemplate.compile("input.docx", configure).render(data).writeToFile("output.docx");

    HtmlRenderPolicy可以通过HtmlRenderConfig进行如下设置:

    • globalFont 全局默认字体
    • globalFontSize 全局默认字号
    • showDefaultTableBorderInTableCell 是否显示嵌套表格的边框(poi生成嵌套表格时默认不显示边框,见#12)
    • numberingIndent 多级列表项缩进长度,默认值360
    • numberingSpacing 列表编号与内容之间的间隔类型,STLevelSuffix.NOTHING/STLevelSuffix.SPACE/STLevelSuffix.TAB

    目前实现了富文本编辑器可实现的大部分效果,后续继续改进...

  • 支持渲染MathML字符串,插件类为MathMLRenderPolicy

  • 支持渲染LaTeX字符串,插件类为LaTeXRenderPolicy

poi-tl-ext's People

Contributors

draco1023 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.