# office **Repository Path**: anmin/office ## Basic Information - **Project Name**: office - **Description**: 使用OpenOffice实现word等在线预览 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-06-15 - **Last Updated**: 2022-06-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## CentOS8 安装 ### 环境 1、CentOS Linux release 8.5.2111 2、java version "1.8.0_144" ### 安装步骤 参考链接: 1、更新系统 ```sh sudo dnf install epel-release sudo dnf update ``` 2、安装OpenOffice ```sh wget https://jaist.dl.sourceforge.net/project/openofficeorg.mirror/4.1.11/binaries/zh-CN/Apache_OpenOffice_4.1.11_Linux_x86-64_install-rpm_zh-CN.tar.gz tar xvf Apache_OpenOffice_4.1.11_Linux_x86-64_install-rpm_zh-CN.tar.gz cd zh-CN/RPMS rpm -Uvh *.rpm ``` 3、启动OpenOffice ```sh /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard & ``` ## Java代码 本项目代码即可,代码启动后,将test6.doc放在/opt目录下 http://ip:10012/preview?url=/opt/test6.doc ## 存在问题 - jodconverter 2.2.1 不支持docx、xlsx等,需要下载2.2.2 - 在centos8中,中文字体显示存在问题 - office各格式文件 转为PDF实现在线预览,缺少效果