加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java开发_模仿百度文库_OpenOffice2PDF_源码下载

发布时间:2020-12-14 06:27:53 所属栏目:Java 来源:网络整理
导读:这几天在研究模仿着做类似于百度文库的东西,在这里给大家分享一下我自己做的东西。 由于需要做这样的项目,我查阅了很多资料,最后选定一下方案去做: PDF(OpenOffice+JodConverter)=>SWF(pdf2swf)=>FlexPaper 浏览 今天就完成第一步: PDF(OpenOffice+JodC

这几天在研究模仿着做类似于百度文库的东西,在这里给大家分享一下我自己做的东西。

由于需要做这样的项目,我查阅了很多资料,最后选定一下方案去做:

PDF(OpenOffice+JodConverter)=>SWF(pdf2swf)=>FlexPaper浏览

今天就完成第一步:

PDF(OpenOffice+JodConverter)

下载后得到:Apache_OpenOffice_incubating_3.4.1_Win_x86_install_zh-CN.exe

String OFFICE_DOC = "doc" String OFFICE_DOCX = "docx" String OFFICE_XLS = "xls" String OFFICE_XLSX = "xlsx" String OFFICE_PPT = "ppt" String OFFICE_PPTX = "pptx" String OFFICE_TO_PDF = "pdf" Office2PDF office2pdf = office2pdf.openOfficeToPDF("e:/test." + OFFICE_DOCX,"e:/test_" + Date().getTime() + "." + office2pdf.openOfficeToPDF("e:/test." + OFFICE_PPTX, String osName = System.getProperty("os.name" (Pattern.matches("Linux.*" "/opt/openoffice.org3" } (Pattern.matches("Windows.*" "C:/Program Files (x86)/OpenOffice.org 3" } (Pattern.matches("Mac.*" "/Application/OpenOffice.org.app/Contents" DefaultOfficeManagerConfiguration config = String officeHome = OfficeManager officeManager = File outputFile = (! System.out.println("文件:" + inputFilePath + "n转换为n目标文件:" + outputFile + "n成功!" flag = OfficeManager officeManager = OfficeDocumentConverter converter = begin_time = ( != File inputFile = ( == String outputFilePath_end = (inputFile.exists()) { flag = } (inputFile.exists()) { flag = } System.out.println("con't find the resource" end_time = System.out.println("文件转换耗时:[" + (end_time - begin_time) + "]ms" String outputFilePath = inputFilePath.replaceAll("." + getPostfix(inputFilePath),".pdf" inputFilePath.substring(inputFilePath.lastIndexOf(".") + 1 }

十一月 05,2012 5:19:15 下午 org.artofsolving.jodconverter.office.ProcessPoolOfficeManager 十一月 05,2012 5:19:15 INFO: starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir 'C:UsersADMINI~1AppDataLocalTemp.jodconverter_socket_host-127.0.0.1_port-2002' 十一月 05,2012 5:19:15 十一月 05,2012 5:19:16 INFO: connected: 'socket,tcpNoDelay=1' 十一月 05,2012 5:19:19 文件:e:/ 十一月 05,2012 5:19:19 下午 org.artofsolving.jodconverter.office.OfficeConnection$1 INFO: disconnected: 'socket,tcpNoDelay=1' 十一月 05,2012 5:19:19 INFO: process exited with code 0 十一月 05,2012 5:19:19 文件转换耗时:[2838 十一月 05,2012 5:19:19 下午 org.artofsolving.jodconverter.office.ProcessPoolOfficeManager 十一月 05,2012 5:19:19 INFO: starting process with acceptString 'socket,tcpNoDelay=1' and profileDir 'C:UsersADMINI~1AppDataLocalTemp.jodconverter_socket_host-127.0.0.1_port-2002' 十一月 05,2012 5:19:19 十一月 05,2012 5:19:20 INFO: connected: 'socket,tcpNoDelay=1' 文件:e:/ 十一月 05,2012 5:19:26 十一月 05,2012 5:19:26 下午 org.artofsolving.jodconverter.office.OfficeConnection$1 INFO: disconnected: 'socket,tcpNoDelay=1' 十一月 05,2012 5:19:26 INFO: process exited with code 0 十一月 05,2012 5:19:26 文件转换耗时:[6417]ms

========================================================

More reading,and english is important.

I'm Hongten

<pre class="code"><span style="font-size: 16px; color: #ff0000;">大哥哥大姐姐,觉得有用打赏点哦!多多少少没关系,一分也是对我的支持和鼓励。谢谢。Hongten博客排名在100名以内。粉丝过千。Hongten出品,必是精品。

E | hongtenzone@foxmail.com ?B |?

========================================================

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读