mirror of
https://github.com/kekingcn/kkFileView.git
synced 2026-04-19 21:18:37 +00:00
添加pdfjs预览pdf文件
This commit is contained in:
@@ -2,10 +2,18 @@ package com.yudianbank.utils;
|
||||
import org.artofsolving.jodconverter.OfficeDocumentConverter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author yudian-it
|
||||
*/
|
||||
@Component
|
||||
public class OfficeToPdf {
|
||||
/**
|
||||
* 获取OpenOffice.org 3的安装目录
|
||||
*
|
||||
* @return OpenOffice.org 3的安装目录
|
||||
*/
|
||||
@Autowired
|
||||
ConverterUtils converterUtils;
|
||||
/**
|
||||
@@ -21,6 +29,24 @@ public class OfficeToPdf {
|
||||
return office2pdf(inputFilePath, outputFilePath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 连接OpenOffice.org 并且启动OpenOffice.org
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
/*public OfficeManager getOfficeManager() {
|
||||
DefaultOfficeManagerConfiguration config = new DefaultOfficeManagerConfiguration();
|
||||
// 获取OpenOffice.org 3的安装目录
|
||||
String officeHome = openOfficePath;
|
||||
config.setOfficeHome(officeHome);
|
||||
// 启动OpenOffice的服务
|
||||
OfficeManager officeManager = config.buildOfficeManager();
|
||||
officeManager.start();
|
||||
return officeManager;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 转换文件
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user