CentOS 6.4安装LibreOffice及字体安装

xiaoxiao2021-02-28  97

最近由于遇到了要使用预览的功能,然后有一个doc转PDF的需求,然后需要使用libreoffice的功能,然后使用 soffice --headless --invisible --convert-to pdf /tmp/abc.docx --outdir /tmp/ 就可以安装了。

libreoffice安装

[root@CentOS~]# yum install libreoffice [root@CentOS~]# yum install libreoffice-headless

字体安装

[root@CentOS~]# mkdir /usr/share/fonts/simsun ##拷贝windows中的simsun.ttc到/usr/share/fonts/simsun/ 然后执行以下命令 [root@CentOS~]#cd /usr/share/fonts/simsun [root@CentOS~]#mkfontscale [root@CentOS~]#mkfontdir [root@CentOS~]#fc-cache -fv 执行以下命令让字体生效 [root@CentOS~]#source /etc/profile
转载请注明原文地址: https://www.6miu.com/read-74317.html

最新回复(0)