Skip to content

caocao0427/poi-tl-ext

 
 

Repository files navigation

poi-tl-ext

GitHub JDK

Maven

<dependency>
    <groupId>io.github.draco1023</groupId>
    <artifactId>poi-tl-ext</artifactId>
    <version>0.3.10</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");

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

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

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

About

Extensions for poi-tl

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 51.4%
  • XSLT 40.6%
  • HTML 8.0%