CentOS installs OpenOffice and converts office files to PDF

Time:2022-4-21

1、 Download OpenOffice software from the official website

Download address:www.openoffice.org/zh-cn/download/

CentOS installs OpenOffice and converts office files to PDF
Select the (RPM) type to download and the corresponding version. The default selection here is the latest version. After selection, click “download full installation” to download

2、 Upload the compressed package to the server, extract and install it

It will not be repeated here. You can upload using xftp or RZ command

3、 Unzip the package

1 Tar -zxvf package name

After decompression, a “zh CN” folder will appear

4、 Enter the unzipped folder

1 cd /zh-cn/RPMS

5、 Install

yum install *.rpm
cd desktop-integration
rpm -ivh openoffice4.1.7-redhat-menus-4.1.7-9800.noarch.rpm

After the command is executed, the “openoffice4” folder will appear in the opt file directory, indicating that the installation is successful.
Open service:

/opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

After successful installation, use jodconverter for conversion

1 download jodconverter
Download address:
sourceforge.net/projects/jodconvert…
Download to the directory / usr / local / SRC
2 decompression

unzip jodconverter-2.2.2.zip

3. Create test file file / 111 docx
Execute the command to convert:

java -jar /usr/local/src/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar /usr/local/src/file/111.docx /usr/local/src/file/111.pdf

The following interface appears and is successful~
CentOS installs OpenOffice and converts office files to PDF
enclosure:

Original link:www.cnblogs.com/pxblog/p/11622969….
Original link:www.jb51.net/article/127359.htm

This work adoptsCC agreement, reprint must indicate the author and the link to this article