linux platform office documentation turns pdf instance of programmer's dish

  • 2020-06-19 12:34:04
  • OfStack

Required materials:

1. Openoffice3.4 (I am a 32-bit centos, and I can download the specified openoffice package according to my own system)

Download address: http: / / sourceforge net/projects/openofficeorg mirror files/stable 3.4.1 track/Apache_OpenOffice_incubating_3. 4.1 _Linux_x86_install - rpm_en - US. tar. gz/download

2, jodconverter. 2.2.2

Download address: http: / / sourceforge net/projects/jodconverter/files latest/download & # 63; source = files

3. 32-bit centos5.5 (network 1 search 1)

4, jdk1. 7

The idea is simply to install openoffice3.4 and convert the document using ES52en.2.2.2.

Detailed steps:

1, unzip the downloaded openoffice package, enter the package directory, only use the following command.

tar-zxvf openoffice package name

2. After unzipping, there will be 1 ES65en-ES66en (or something similar, depending on the language). After entering the directory, there will be another rpms, and enter the folder rpms. To install openoffice, type the following command (if prompted for a dependency, you'll need to install it one by one. Some systems on: ES70en-ES71en *.rpm, not automatically installed)

rpm -ivh *.rpm

3. After installation, openoffice service should be turned on. openoffice is installed in the /opt file by default. (When you start the service, you will encounter a series of errors. You can find the search engine.)

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

4. Judge whether the openoffice service is started successfully

ps aux|grep soffice view process

5. After opening openoffice service successfully, use ES97en.2.2.2 to convert. You can use the following command (it is better to use root user, otherwise you will encounter many permission problems)

jodconverter stress path: / usr local/wenku/jodconverter - 2.2.2 lib/jodconverter - cli - 2.2.2. jar

File to convert: /tmp/ 1.doc

Converted file: /tmp/ 1.pdf

java -jar /usr/local/wenku/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar /tmp/1.doc /tmp/1.pdf

If successful, there will be an additional pdf file under the /tmp folder.
Open pdf and see if there is a messy code (to solve the problem of openoffice word file transferring to PDF Chinese).


Related articles: