点击▲关注 “爪哇笔记” 给公众号标星置顶
更多精彩 第一时间直达
properties> <openoffice.version>4.1.2</openoffice.version> <jodconverter.version>4.3.0</jodconverter.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version></properties><!-- openoffice --><dependency> <groupId>org.openoffice</groupId> <artifactId>unoil</artifactId> <version>${openoffice.version}</version></dependency><dependency> <groupId>org.openoffice</groupId> <artifactId>ridl</artifactId> <version>${openoffice.version}</version></dependency><dependency> <groupId>org.openoffice</groupId> <artifactId>jurt</artifactId> <version>${openoffice.version}</version></dependency><dependency> <groupId>org.openoffice</groupId> <artifactId>juh</artifactId> <version>${openoffice.version}</version></dependency><dependency> <groupId>org.jodconverter</groupId> <artifactId>jodconverter-local</artifactId> <version>${jodconverter.version}</version></dependency><dependency> <groupId>org.jodconverter</groupId> <artifactId>jodconverter-core</artifactId> <version>${jodconverter.version}</version></dependency><dependency> <groupId>org.jodconverter</groupId> <artifactId>jodconverter-spring-boot-starter</artifactId> <version>${jodconverter.version}</version></dependency>
# https://github.com/sbraconnier/jodconverterjodconverter.local.enabled=true# 设置openOffice主目录 可省略 默认会自动读取系统安装路径jodconverter.local.office-home=C:/Program Files (x86)/OpenOffice 4# 开启多个openOffice进程,每个端口对应一个进程jodconverter.local.portNumbers=8100,8200# openOffice进程重启前的最大进程数jodconverter.local.maxTasksPerProcess=100
@Resourceprivate DocumentConverter documentConverter;
documentConverter.convert(fromFile).to(toFile).execute();
文章有问题?点此查看未经处理的缓存