Under Linux, you can convert common Office documents to PDF files via LibreOffice, with the following steps:
1, installation LibreOffice
wget http://free.nchc.org.tw/tdf/libreoffice/stable/5.4.6/rpm/x86/LibreOffice_5.4.6_Linux_x86_rpm.tar.gz
Tar zxvf libreoffice_5.4.6_linux_x86_rpm.tar.gz
sudo yum install libreoffice_5.4.6.2_linux_x86_rpm/rpms/*.rpm
wget http://free.nchc.org.tw/tdf/libreoffice/stable/5.4.6/rpm/x86/LibreOffice_5.4.6_Linux_x86_rpm_langpack_zh-CN.tar.gz
Tar zxvf libreoffice_5.4.6_linux_x86_rpm_langpack_zh-cn.tar.gz
sudo yum install libreoffice_5.4.6.2_linux_x86_rpm_langpack_zh-cn/rpms/*.rpm
2, install fonts, prevent garbled
Copy all the files under C:\windows\fonts in the Windows operating system to the/usr/share/fonts directory under Linux and execute the following command in that directory
CHMOD-RF 755 *
Mkfontscale
Mkfontdir
Fc-cache–fv
3. Conversion
/usr/bin/libreoffice5.4--invisible--convert-to PDF 1.xlsx
/usr/bin/libreoffice5.4--invisible--convert-to PDF 2.docx
4. Problems that may be encountered
Different operating systems, due to the installation of the base library or third-party software, may be partially dependent on the library does not exist, online lookup solution, I installed two libraries to run (32-bit CentOS)
Yum Install Cairo-y
Yum Install libcups.so.2
Use LibreOffice to transfer Office documents to PDF under Linux