centos7 下安装 LibreOffice SpringBoot实现Word转PDF (环境安装篇--一)

1. 下载软件

http://download.documentfoundation.org/libreoffice/stable/6.3.0/rpm/x86_64/

LibreOffice_6.3.0_Linux_x86-64_rpm.tar.gz

LibreOffice_6.3.0_Linux_x86-64_rpm_langpack_zh-CN.tar.gz

LibreOffice_6.3.0_Linux_x86-64_rpm_sdk.tar.gz

 

 

2. 解压

解压所有文件

tar -zxvf LibreOffice_6.3.0_Linux_x86-64_rpm.tar.gz

tar -zxvf LibreOffice_6.3.0_Linux_x86-64_rpm_langpack_zh-CN.tar.gz

tar -zxvf LibreOffice_6.3.0_Linux_x86-64_rpm_sdk.tar.gz

 

3. 安装

进入每个文件夹下的RPMS,并使用yum localinstall *.rpm -y进行安装

cd LibreOffice_6.3.0.4_Linux_x86-64_rpm/RPMS

yum localinstall *.rpm -y

cd LibreOffice_6.3.0.4_Linux_x86-64_rpm_sdk/RPMS

yum localinstall *.rpm -y

cd LibreOffice_6.3.0.4_Linux_x86-64_rpm_langpack_zh-CN/RPMS

yum localinstall *.rpm -y

 

4. 启动服务

nohup /opt/libreoffice6.3/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

5. 测试wordpdf

libreoffice6.3 --headless --invisible --convert-to pdf <待转换的word路径> --outdir <生成的pdf路径>

转载于:https://www.cnblogs.com/hg-super-man/p/11446923.html

你可能感兴趣的:(centos7 下安装 LibreOffice SpringBoot实现Word转PDF (环境安装篇--一))