draco1023 / poi-tl-ext

Extensions for poi-tl
Apache License 2.0
211 stars 53 forks source link

渲染失败 #35

Closed qyw10456 closed 2 years ago

qyw10456 commented 2 years ago

大佬您好 HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy(); Configure configure = Configure.builder().bind("context", htmlRenderPolicy).build(); Map<String, Object> hashMap = new HashMap<>(); hashMap.put("context", safeTrain.getTrainContext()); XWPFTemplate template = XWPFTemplate.compile(FileUtils.getInputStream(URL),configure).render(hashMap); image 发现并没有渲染标签,这是我用的版本 image 不知道哪里有问题,求大佬指教

draco1023 commented 2 years ago

请先检查html内容是否正确,poi-tl的版本用1.10.3试试

qyw10456 commented 2 years ago

hashMap.put("context","

Hello world!

"); image 换成1.10.3还是不行

qyw10456 commented 2 years ago

这里put的值里有标签,被自动装换了,我直接复制的你示例里的值