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

发布时间:2019-12-03 发布网站:大佬教程
大佬教程收集整理的这篇文章主要介绍了java开发_模仿百度文库_OpenOffice2PDF_源码下载大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

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

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

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

今天就完成第一步:

PDF(OpenOffice+JodConverter)

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

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

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

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

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

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

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

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

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

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

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

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 }

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

十一月 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:\Users\ADMINI~1\AppData\Local\Temp\.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:\Users\ADMINI~1\AppData\Local\Temp\.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

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

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

E | hongtenzone@foxmail.com  B | 

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

大佬总结

以上是大佬教程为你收集整理的java开发_模仿百度文库_OpenOffice2PDF_源码下载全部内容,希望文章能够帮你解决java开发_模仿百度文库_OpenOffice2PDF_源码下载所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ群:277859234,请注明来意。