91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

web項目使用OpenOffice實現前端在線預覽office文檔源碼,同步博文講解使用,手把手教學:https://blog.csdn.net/ITBigGod

資源截圖

代碼片段和文件信息

package?com.zout;??
???
import?java.io.BufferedReader;??
import?java.io.File;??
import?java.io.IOException;??
import?java.io.InputStream;??
import?java.io.InputStreamReader;??
???
import?com.artofsolving.jodconverter.DocumentConverter;??
import?com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;??
import?com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection;??
import?com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter;??
???
public?class?DocConverter?{??
????private?static?final?int?environment?=?1;//?環境1:windows2:linux(涉及pdf2swf路徑問題)??
????private?String?fileString;??
????private?String?outputPath?=?““;//?輸入路徑,如果不設置就輸出在默認位置(可不修改)??
????private?String?fileName;??
????private?File?pdfFile;??
????private?File?swfFile;??
????private?File?docFile;??
???
????public?DocConverter(String?fileString)?{??
????????ini(fileString);??
????}??
???
????/*?
?????*?重新設置?file?@param?fileString?
?????*/??
????public?void?setFile(String?fileString)?{??
????????ini(fileString);??
????}??
???
????/*?
?????*?初始化?@param?fileString?
?????*/??
????private?void?ini(String?fileString)?{??
????????this.fileString?=?fileString;??
????????fileName?=?fileString.substring(0?fileString.lastIndexOf(“.“));??
????????docFile?=?new?File(fileString);??
????????pdfFile?=?new?File(fileName?+?“.pdf“);??
????????swfFile?=?new?File(fileName?+?“.swf“);??
????}??
???
????/*?
?????*?轉為PDF?@param?file?
?????*/??
????private?void?doc2pdf()?throws?Exception?{??
????????if?(docFile.exists())?{??
????????????if?(!pdfFile.exists())?{??
????????????????OpenOfficeConnection?connection?=?new?SocketOpenOfficeConnection(8100);??
????????????????try?{??
????????????????????connection.connect();??
????????????????????DocumentConverter?converter?=?new?OpenOfficeDocumentConverter(connection);??
????????????????????converter.convert(docFile?pdfFile);??
????????????????????//?close?the?connection??
????????????????????connection.disconnect();??
????????????????????System.out.println(“****pdf轉換成功,PDF輸出:“?+?pdfFile.getPath()?+?“****“);??
????????????????}?catch?(java.net.ConnectException?e)?{??
????????????????????//?ToDo?Auto-generated?catch?block??
????????????????????e.printStackTrace();??
????????????????????System.out.println(“****swf轉換異常,openoffice服務未啟動!****“);??
????????????????????throw?e;??
????????????????}?catch?(com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException?e)?{??
????????????????????e.printStackTrace();??
????????????????????System.out.println(“****swf轉換器異常,讀取轉換文件失敗****“);??
????????????????????throw?e;??
????????????????}?catch?(Exception?e)?{??
????????????????????e.printStackTrace();??
????????????????????throw?e;??
????????????????}??
????????????}?else?{??
????????????????System.out.println(“****已經轉換為pdf,不需要再進行轉化****“);??
????????????}??
????????}?else?{??
????????????System.out.println(“****swf轉換器異常,需要轉換的文檔不存在,無法轉換***

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????7234??2018-05-13?14:23??Test_Web\.classpath

?????文件???????1339??2018-05-13?15:04??Test_Web\.project

????.......???????522??2017-11-19?12:48??Test_Web\.settings\.jsdtscope

????.......???????364??2017-11-19?12:48??Test_Web\.settings\org.eclipse.jdt.core.prefs

?????文件????????501??2018-05-13?15:04??Test_Web\.settings\org.eclipse.wst.common.component

????.......???????414??2017-11-19?12:48??Test_Web\.settings\org.eclipse.wst.common.project.facet.core.xml

????.......????????49??2017-11-19?12:48??Test_Web\.settings\org.eclipse.wst.jsdt.ui.superType.container

????.......?????????6??2017-11-19?12:48??Test_Web\.settings\org.eclipse.wst.jsdt.ui.superType.name

?????文件???????8051??2018-05-13?15:12??Test_Web\src\com\zout\DocConverter.java

????.......??????1544??2018-05-12?20:42??Test_Web\WebRoot\documentUpload.jsp

?????文件???????2866??2018-05-13?14:36??Test_Web\WebRoot\documentView.jsp

?????文件???????4353??2018-05-13?15:21??Test_Web\WebRoot\docUploadConvertAction.jsp

????.......????412092??2018-05-12?20:35??Test_Web\WebRoot\FlexPaperViewer.swf

????.......??????3501??2018-05-12?23:54??Test_Web\WebRoot\index.jsp

????.......?????10540??2018-05-12?20:35??Test_Web\WebRoot\js\flexpaper_flash.js

????.......?????11519??2018-05-12?20:35??Test_Web\WebRoot\js\flexpaper_flash_debug.js

????.......?????91342??2018-05-12?20:35??Test_Web\WebRoot\js\jquery.js

????.......?????10220??2018-05-12?20:35??Test_Web\WebRoot\js\swfobject.js

????.......????????39??2017-11-19?12:48??Test_Web\WebRoot\meta-INF\MANIFEST.MF

?????文件???????5821??2018-05-13?15:12??Test_Web\WebRoot\WEB-INF\classes\com\zout\DocConverter.class

????.......?????55147??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\activation.jar

????.......???1336376??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\alipay-sdk-java20160712120059.jar

????.......??????4467??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\aopalliance-1.0.jar

????.......???1545023??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\aspectjweaver.jar

????.......????242477??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\bsh-1.3.0.jar

????.......????322362??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\cglib-nodep-2.2.jar

????.......????188671??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\commons-beanutils-1.7.0.jar

????.......????206035??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\commons-beanutils-core-1.8.0.jar

????.......????118726??2018-05-11?15:33??Test_Web\WebRoot\WEB-INF\lib\commons-beanutils.jar

????.......?????41123??2018-05-12?21:58??Test_Web\WebRoot\WEB-INF\lib\commons-cli-1.2.jar

............此處省略80個文件信息

評論

共有 條評論