Use LibreOffice to transfer Office documents to PDF under Linux

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.