参考file-convert-util工具,实现doc,docx,html,md,pdf,png转换
参考 https://gitee.com/zhengqingya/file-convert-util 项目,打包到本地仓库实现doc,docx,html,md,pdf,png转换
https://gitee.com/bestman_456/file-convert-util-ext
1. 安装jar到本地仓库
aspose-words-18.6-jdk16.jar
aspose-cells-8.5.2.jar
Spire.Doc.jar
Spire.Pdf.jar<dependency><groupId>com.aspose</groupId><artifactId>aspose-words</artifactId><version>18.6</version></dependency><dependency><groupId>com.aspose</groupId><artifactId>aspose-cells</artifactId><version>8.5.2</version></dependency><dependency><groupId>com.spire</groupId><artifactId>spire.doc</artifactId><version>2.7.3</version></dependency><dependency><groupId>com.spire</groupId><artifactId>spire.pdf</artifactId><version>2.6.3</version></dependency>
命令
mvn install:install-file -Dfile=D:\workspace\idea_workspace\file-convert-util\lib\Spire.Pdf.jar -DgroupId=com.spire -DartifactId=spire.pdf -Dversion=2.6.3 -Dpackaging=jar
2. 优化代码
保留工具类,去除Application.java,StartAppRunner.java 等
使用FileConvertUtil 工具类API
Word2Html
Word2Pdf
Word2Jpg
Word2Png
Html2Word
Html2Pdf
Html2Jpg
Html2PngBy2
Doc2Docx
Excel2Pdf
Html2Png
Markdown2Html 转换格式不是太完善
Pdf2Word
Pdf2Png
3. 安装
pom.xml添加插件依赖
<!--compiler--><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding></configuration></plugin><!-- Source --><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.2.1</version><executions><execution><phase>package</phase><goals><goal>jar-no-fork</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-surefire-plugin</artifactId><version>2.22.1</version><configuration><skipTests>true</skipTests></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>3.0.2</version><executions><execution><id>default-jar</id><phase>package</phase><goals><goal>jar</goal></goals></execution></executions><configuration><excludes><exclude>/logback.xml</exclude></excludes><includes><include>/**</include></includes></configuration></plugin>
mvn clean install后,其他项目可以添加依赖
<dependency><groupId>com.yl</groupId><artifactId>file-convert-util</artifactId><version>1.0.0</version>
</dependency>
参考file-convert-util工具,实现doc,docx,html,md,pdf,png转换相关推荐
- vue - - - - - 在线预览常见文件格式 .doc, .docx, .xls, .xlsx,.pdf
在线预览常见文件 1.HTML5 - ```embed```标签 1.1 注意⚠️ 1.2 使用方式 2. HTML - ```iframe```标签 2.1 注意⚠️ 2.2 使用方式 3. HTM ...
- gbk编码在线转换工具_珍藏的4个PDF格式转换网站「在线工具,无需下载,还免费哦。」...
PDF文件相信大家并不陌生,我们经常在工作中都会收到客户.同事.老板发来这种PDF文件,这些文件往往都会记录着一些产品的详细介绍与说明.但是PDF并不是那么好编辑的,我们通常都会将PDF转换成Offi ...
- Java版Word开发工具Aspose.Words功能解析:将Word文档(DOC / DOCX)转换为HTML
Microsoft Word文件格式DOC / DOCX很著名,因为文字处理器支持多种功能来组织和解释信息.同样,HTML文件格式有助于在Web应用程序中显示信息. 在本文中,我们将学习使用Java将 ...
- doc/docx 批量转换html txt工具
用python处理信息时经常需要面对doc/docx文档,这两者机制还不一样,偏偏拿到的文件既有doc格式又有docx的,很头疼. python的第三方库python-docx适用于写入,但对于读取信 ...
- Audio File Convert(afconvert)工具转换音频格式
在做游戏音效的时候,通常会使用.wav格式的音频文件,但是Apple通常推荐我们使用.CAF格式的,同时也提供了afconvert工具可以方便我们对音频文件进行转换. 首先可以输入如下命令来查看支持哪 ...
- java使用freemark实现word(.doc/.docx)/pdf生成和导出(附源码和模板文件)
freemark生成word/pdf 一. 背景 二.实现的技术选型以及遇到的坑 三.最终的效果 2.1 `.doc` word效果展示 2.1 `.docx` word效果展示 2.2 docx w ...
- Java web/springboot上传word/doc/docx文档(含图片)与HTML富文本导入/导出互相转换解析!附项目源码
测试效果 先看下效果 文档内容如下: 上传 上传docx文档 查看解析内容 <html><head><style>p{margin-top:0pt;margin-b ...
- 在线预览doc,docx文档
在线预览doc,docx文档 前言:上传成功以后的每个文档都能获取到所传文件的路径; 我这里是一个maven项目,需要在pom文件引入 <!-- 文件预览 --><dependenc ...
- python word转pdf linux_Linux下使用LibreOffice+python将doc/docx/wps格式的文档转成html/txt/docx等格式...
Linux下的word文档格式转换工具 最近接到一个需求,要将所有不同格式的文档(包括.doc/.docx/.wps)转成统一格式,如都转为.docx,或直接转为.html 或.txt.经调研后,发现 ...
最新文章
- ossec 学习二 (ossec -analogi安装)
- golang struct json map 互相转化
- Android Studio Gradle优化方法
- java 正则 空格_Java中关于空格的正则表达式
- python 逻辑回归权重_Python 逻辑回归
- MySQL运维知识点_mysql运维必备知识点(转载至其他作者)
- vue-router 跳转原理
- SQL2005 游标学习
- android期末大作业_关于大学期末的一点碎碎念
- python 并发编程 socket 服务端 客户端 阻塞io行为
- 全网首发:使用安卓MediaCodec Encoder进行编码时的方向问题
- vb从入门到精通_干货|让你 ArcGIS Engine从入门到精通的22个视频
- 关于华为手机使用MTK刷机时出现failed to get PMT info的解决办法
- 4g内存 mysql_mysql 4G内存配置表
- 银行等额本息还款算法
- 看雪学院将举办《安全开发者峰会》,有这11个安全议题
- Outlook 2007无法连接Exchange 2007
- 交换机基础知识和VLAN概述
- Chrome流量监控
- 第15课:郭盛华课程_VB编程之图形与图像控件的使用方法
热门文章
- Xftp/Xshell 要继续使用此程序,您必须应用最新的更新或使用新版本
- ArcGIS Pro数据加载学习总结
- Linux那些事儿之Linux sysfs -- 剖析版本虽旧,桃花依旧笑春风
- 怎么看服务器硬盘是机械还是固态,怎么辨别机械硬盘和固态硬盘?(附多种方法)...
- EPROCESS+KPCR+ETHREAD部分介绍-学习记录
- Spring——Security安全框架之记住我
- 优秀课件笔记之视听巧记汉英成语2
- 前端监控--vue项目中使用友盟统计监控
- efci 计算机网络,数值型关联规则挖掘在网络入侵检测系统中的应用研究
- The server time zone value .. is unrecognized or represents more than one time zone