zoukankan      html  css  js  c++  java
  • SpringBoot+OpenOffice Office文档在线预览

    将office文件转化成pdf,nginx代理进行预览
    1.安装OpenOffice,并打开服务。
    windows:进入cmd:
    cd C:Program Files (x86)OpenOffice 4program
    soffice -headless -accept="socket,host=IP,port=8100;urp;" -nofirststar2.pom中导入jar包<!-- https://mvnrepository.com/artifact/org.jodconverter/jodconverter-local -->
    <dependency>
    <groupId>org.jodconverter</groupId>
    <artifactId>jodconverter-local</artifactId>
    <version>4.2.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.jodconverter/jodconverter-spring-boot-starter -->
    <dependency>
    <groupId>org.jodconverter</groupId>
    <artifactId>jodconverter-spring-boot-starter</artifactId>
    <version>4.2.2</version>
    </dependency>

    3.SpringBoot配置文件
    jodconverter.local.enabled=true
    jodconverter.local.port-numbers=8100

    4.编码
    import org.jodconverter.DocumentConverter;
    @Autowired
    private DocumentConverter documentConverter;
    documentConverter.convert(oldFile).to(pdfFile).execute();
     
  • 相关阅读:
    iOS 远程推送
    iOS 本地推送
    iOS 循环利用的注意事项
    iOS 通知代理执行代理方式时,代理为nil的解决办法
    iOS SSZipArchive
    iOS PushMebaby
    Objective
    Objective
    Objective
    Objective
  • 原文地址:https://www.cnblogs.com/god-monk/p/11321728.html
Copyright © 2011-2022 走看看