Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use LibreOffice to realize document format conversion under CentOS

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how to use LibreOffice to convert document format under CentOS". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "how to use LibreOffice to achieve document format conversion under CentOS"!

The server is centos7. To install libreoffice directly using yum, you need about 600mb+ disk space:

# you can delete it before installing it to prevent yum remove libreoffice-*yum install libreoffice from being installed before

Wait for the installation to complete, confirm the version and so on, although the official version has reached version 6.1, there is still a 5.3.6 package in yum, but there is nothing wrong with it. Here, I suggest you use their own linux system package management tools to install, which can save you a lot of trouble.

[root@localhost /] # soffice-- versionlibreoffice 5.3.6.1 30 (build:1)

If you don't know how to use it, you can use soffice-help to take a look at the help. With so many parameters and use cases, the conversion format is simple:

Soffice-- headless-- convert-to docx / opt/upload/source/123.doc-- outdir / opt/upload/source

The above command is to convert the / opt/upload/source/123.doc file to docx format and output it to the / opt/upload/source folder.

By default:

The output file is saved with the source file name + new extension

Will overwrite existing files with the same name in outdir

A successful conversion will output something like this:

Convert / opt/upload/source/123.doc-> / opt/upload/source/123.docx using filter: ms word 2007 xmloverwriting: / opt/upload/source/123.docx

Libreoffice automatically matches the format filter (filter) based on the file format. As for which formats it supports, please refer to the official website.

At this point, I believe that everyone on the "CentOS how to use LibreOffice to achieve document format conversion" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report