下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、openoffice 入门教程首先安装apache_openoffice_4.0.1_win_x86_install_zh-cn.exe 或者apache_openoffice_3.2.0_linuxx86-64_install_wjre_zh-cn.tar.gz linux 说明1、复制 apache_openoffice_3.2.0_linuxx86-64_install_wjre_zh-cn.tar.gz到/opt 目录安装,安装命令如下:tar -xzvf apache_openoffice_3.2.0_linuxx86-64_install_wjre_zh-cn.tar.gz cd
2、ooo320_m12_native_packed-1_zh-cn.9483/rpms rpm -ivh *.rpm 2、在 /etc/rc.d/rc.local 中加入如下内容(假设openoffice 安装在 /opt/3 ) :/opt/3/program/soffice -accept=socket,host=localhost,port=8100;urp;staroffice.servicemanager -nologo -headless -nofirststartwizard & 3 、 在shell命 令 窗 口 执
3、 行 命 令 : nohup /opt/3/program/soffice -accept=socket,host=localhost,port=8100;urp;staroffice.servicemanager -nologo -headless -nofirststartwizard & 4、查看启动命令ps -ef | grep openoffice 6、重启 oa window 说明echo 用以下命令启动openoffice 服务 进入目录cd c:program files (x86)openoffice 4program 输入启动服务soff
4、ice -headless -accept=socket,host=,port=8100;urp; -nofirststartwizard jar 包说明可以直接在当前word 文档下载jar 包例子 1 commons-io-1.4.jarjodconverter-2.2.0.jarjodconverter-cli-2.2.0.jarjuh-2.2.0.jarjurt-2.2.0.jarridl-2.2.0.jarslf4j-api-1.4.0.jarslf4j-jdk14-1.4.0.jarunoil-2.2.0.jarxstream-1.2.2.jar例子 2 需要多家
5、两个jar 包jooconverter-2.0rc2.jarridl-2.0.jar例子 1 package com.test; import java.io.file; import .connectexception; /* import net.sf.jooreports.converter.documentconverter; import net.sf.jooreports.converter.documentformatregistry; import net.sf.jooreports.converter.xmldocumentformatregistry; import net
6、.sf.jooreports.openoffice.connection.openofficeconnection; import net.sf.jooreports.openoffice.connection.socketopenofficeconnection; import net.sf.jooreports.openoffice.converter.openofficedocumentconverter; 注释掉的包用com.artofso* 开头的包替换掉*/ /* /* * openofficeutil * 将要转成的targetfile 带上后缀* 工具本身能转成常用的html,
7、pdf */ public class test public void doctopdf(file sourcefile, file targetfile) /connect to an openo instance running on port 8100 documentformatregistry documentformatregistry = new xmldocumentformatregistry(); /默认本机,如果是远程机器new socketopenofficeconnection( 服务器ip 地址,8100) openofficeconnectio
8、n connection = new socketopenofficeconnection(8100); try connection.connect(); / convert documentconverter converter = new openofficedocumentconverter(connection , documentformatregistry); converter.convert(sourcefile, targetfile); catch(connectexception cex) cex.printstacktrace(); finally / close t
9、he connection if(connection!=null) connection.disconnect(); connection = null; public static void main(string args) throws exception test p = new test(); p.doctopdf(new file(d:xxx不受理告知书.doc),new file(d:aa.html); p.doctopdf(new file(d:xxx不受理告知书.doc),new file(d:aa.pdf); 例子 2 package com.test; import j
10、ava.io.file; import .connectexception; import net.sf.jooreports.converter.documentconverter; import net.sf.jooreports.converter.documentformatregistry; import net.sf.jooreports.converter.xmldocumentformatregistry; import net.sf.jooreports.openoffice.connection.openofficeconnection; import net.sf.joo
11、reports.openoffice.connection.socketopenofficeconnection; import net.sf.jooreports.openoffice.converter.openofficedocumentconverter; /* /* * openofficeutil * 将要转成的targetfile 带上后缀* 工具本身能转成常用的html,pdf */ public class test public void doctopdf(file sourcefile, file targetfile) /connect to an openoffice
12、.org instance running on port 8100 documentformatregistry documentformatregistry = new xmldocumentformatregistry(); /默认本机,如果是远程机器new socketopenofficeconnection( 服务器ip 地址,8100) openofficeconnection connection = new socketopenofficeconnection(8100); try connection.connect(); / convert documentconverter converter = new openofficedocumentconverter(connection , documentformatregistry); converter.convert(sourcefile, targetfile); catch(connectexception cex) cex.printstacktrace(); finally / close the connection if(connection!=null) connection.disconnect(); connec
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024-2034年中国高龄健康消费行业市场现状分析及竞争格局与投资发展研究报告
- 《光与颜色》作业设计方案-2023-2024学年科学人教版2001
- 《农作物杂交种子生产技术导学案》
- 网络问卷调查系统分析与设计
- 农村劳动力外出务工不利于粮食生产吗对农户要素替代与种植结构调整行为及约束条件的解析
- 糖尿病病人药物指导
- 中秋节活动设计方案公司
- 2024年中高压及特殊性能玻璃钢管市场分析及竞争策略报告
- 2024年氙气项目经营分析报告
- 2024年除涝排水设施管理服务项目经营分析报告
- 应用型本科教育课程改革探析
- 基于单片机温度控制报警系统设计
- 幼儿园中班健康《逃生大闯关》课件
- 幼儿园优质公开课:大班数学《谁吃了桃子》有声动态课件
- 质量成本汇总表
- 电脑组装与维修从入门到精通
- 平安保险计划书
- 自身免疫性疾病的保胎治疗
- 国学抢答题教材课件
- 小学数学-一笔画教学设计学情分析教材分析课后反思
- 对会计造假现象的剖析
评论
0/150
提交评论