修改POI ,xdocreport源码,满足word按照段落解析成html,并支持公式

上传者: 41271234 | 上传时间: 2021-05-25 18:01:36 | 文件大小: 860KB | 文件类型: ZIP
POI ,xdocreport框架是一个半成品,往往使用默认的解析结果无法满足业务需求,花了很长时间和心血研究了其源码,修复了以下问题 问题1: xdocreport能解析word转html,但解析出来的是基于word的整套html,往往我们的需求是 按照段落顺序分块解析成一小块的html,并保存数据库,方便我们解决业务上的各种需求。 解决方案: 修改xdocreport源码,按照段落解析并返回每个段落的html 问题2: 不知道段落是具体哪一个标题,没有层级概念,无法识别字体,加粗,字体颜色 解决方案: 解析每一个段落的层级标题,字体的属性并返回 问题3: 不支持解析公式(office公式,wps公式) 解决方案: 修改xdocreport解析段落源码,支持解析office公式并转mathml格式返回给前端页面显示,wps公式其实就是wmf图片,但是手动插入的公式解析不了,复制的wmf图片却可以解析,xdocreport底层不支持,修改源码让其支持。 备注:当前版本解决了docx转html,doc和docx是两套API,后续更新doc转html. 有任何不懂或者疑问,欢迎评论区留言沟通。

文件下载

资源详情

[{"title":"( 25 个子文件 860KB ) 修改POI ,xdocreport源码,满足word按照段落解析成html,并支持公式","children":[{"title":"word-import","children":[{"title":"word-import.iml <span style='color:#111;'> 81B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"main","children":[{"title":"resources","children":[{"title":"test-template.docx <span style='color:#111;'> 815.06KB </span>","children":null,"spread":false},{"title":"OMML2MML.XSL <span style='color:#111;'> 92.68KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"legend","children":[{"title":"word","children":[{"title":"entity","children":[{"title":"Node.java <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false},{"title":"CustomElementMeta.java <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false},{"title":"CommonConstants.java <span style='color:#111;'> 234B </span>","children":null,"spread":false},{"title":"Subject.java <span style='color:#111;'> 369B </span>","children":null,"spread":false},{"title":"R.java <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false}],"spread":true},{"title":"utils","children":[{"title":"WordDocxParseUtils.java <span style='color:#111;'> 2.24KB </span>","children":null,"spread":false},{"title":"MathMlUtils.java <span style='color:#111;'> 2.67KB </span>","children":null,"spread":false},{"title":"ImageUtils.java <span style='color:#111;'> 8.38KB </span>","children":null,"spread":false}],"spread":true},{"title":"docx","children":[{"title":"CustomContentHandler.java <span style='color:#111;'> 5.08KB </span>","children":null,"spread":false},{"title":"ImageHandler.java <span style='color:#111;'> 858B </span>","children":null,"spread":false},{"title":"CustomIXWPFConverter.java <span style='color:#111;'> 518B </span>","children":null,"spread":false},{"title":"CustomAbstractXWPFConverter.java <span style='color:#111;'> 1.34KB </span>","children":null,"spread":false},{"title":"CustomXWPFDocumentVisitor.java <span style='color:#111;'> 44.87KB </span>","children":null,"spread":false},{"title":"CustomXHTMLMapper.java <span style='color:#111;'> 21.12KB </span>","children":null,"spread":false},{"title":"CustomXHTMLConverter.java <span style='color:#111;'> 2.08KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":".idea","children":[{"title":".gitignore <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"misc.xml <span style='color:#111;'> 541B </span>","children":null,"spread":false},{"title":"workspace.xml <span style='color:#111;'> 3.36KB </span>","children":null,"spread":false},{"title":"uiDesigner.xml <span style='color:#111;'> 8.71KB </span>","children":null,"spread":false},{"title":"compiler.xml <span style='color:#111;'> 608B </span>","children":null,"spread":false},{"title":"jarRepositories.xml <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明