CentOS 7: How to install OpenOffice and Swftool

install OpenOffice

Download it from OpenOffice website: http://download.openoffice.org/all_ rc.html#untested -full ;

Enter the directory where the downloaded OpenOffice installation package is located, and then execute the command to unzip the installation package to get the directory zh CN

tar -zxv -f Apache_OpenOffice_4.0.1_Linux_x86_install-rpm_zh-CN.tar.gz (Specifically see the name of the downloaded file)

Enter the directory zh CN, and then enter the directory RPMs. Execute the following command to install all components of OpenOffice. RPM will install RPM packages according to the dependency order of RPM packages

rpm -ivh *.rpm

After the component is installed, the OpenOffice desktop integration program is installed and the installation file directory is entered

cd /opt/zh-CN/RPMS/desktop-integration

Inside is the RPM package of OpenOffice desktop integration program for four different Linux operating system distributions. Therefore, install the installation package suitable for RedHat and execute the following command to install it

rpm -ivh openoffice4.0-redhat-menus-4.0-9714.noarch.rpm

Execute the following command to start in the background

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

Use the command to check whether the port 8100 is occupied by sOffice, and the installation is successful.

netstat -lnp |grep 8100

Install swftools

Installing GCC + +

yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel

Download swftools-0.9.2 tar.gz And unzip the installation, execute the following command

tar -xzvf swftools-0.9.2.tar.gz
cd swftools-0.9.2
./configure --prefix=/usr/local/swfTools(This is the specified installation path, if there is no such directory to new key, otherwise the installation is not successful)
make install

Installation may encounter the following problems

Problems may be encountered 1.
modules/.././types.h:39:2: error: #error "no way to define 64 bit integer"
modules/.././types.h:42:2: error: #error "don't know how to define 32 bit integer"
modules/.././types.h:45:2: error: #error "don't know how to define 16 bit integer"
modules/.././types.h:48:2: error: #error "don't know how to define 8 bit integer"
How to Solve:
[root~]# ldconfig /usr/local/lib
[root~]# ldconfig /usr/local/lib
[root~]# ./configure

Problems may be encountered 2:
rm -f /usr/local/swfTools/share/swftools/swfs/default_viewer.swf -o -L /usr/local/swfTools/share/swftools/swfs/default_viewer.swf
rm:No use -- o
Try 'rm --help' for more information.
make[1]: *** [install] error 1
make[1]: out of the floder“/opt/swftools-0.9.2/swfs”
make: *** [install] error 2
How to Solve:
Use find . / |xargs grep -r -i "default_viewer" to filter out the corresponding problem file, that is, the Makefile and Makefile.in files in the swfs directory, and remove the -o -L places in the two files.

Problem 3 may be encountered.
make[1]: Entering directory `/opt/swftools-0.9.2/swfs'
/bin/sh ../mkinstalldirs /usr/local/swfTools/share/swftools
/bin/sh ../mkinstalldirs /usr/local/swfTools/share/swftools/swfs
/usr/bin/install -c -m 644 ./simple_viewer.swf /usr/local/swfTools/share/swftools/swfs/simple_viewer.swf
/usr/bin/install: cannot stat ‘./simple_viewer.swf’: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/opt/swftools-0.9.2/swfs'
make: *** [install] Error 2
Solution: Download the installation package again, the corresponding folder of the installation package here can not find the corresponding simple_viewer.swf file

Set environment variables and take effect

vim /etc/profile
export PATH=$PATH:/usr/swftools/bin/(/usr/swftools/bin/ is the bin directory corresponding to your swftools installation)
source /etc/profile (configure environment variables to take effect)

Download Xpdf China- simplified.tar.gz And font.zip

##Unzip the corresponding file
tar -zxvf xpdf-chinese-simplified.tar.gz
unzip font.zip
mv xpdf-chinese-simplified /usr/local

##Copy the font file to the corresponding folder to prevent messy code
mv Gbsn00lp.ttf gkai00mp.ttf /usr/local/xpdf-chinese-simplified/CMap/

Modify configuration file

cd /usr/local/xpdf-chinese-simplified
vim add-to-xpdfrc
##Add a line and change the font path above.
displayCIDFontTT        Adobe-GB1       /usr/local/xpdf-chinese-simplified/CMap/gkai00mp.ttf

The test was successful

pdf2swf -s languagedir=/usr/local/xpdf-chinese-simplified -T 9 -s poly2bitmap -s zoom=150 -s flashversion=9 "/opt/123.pdf" -o "/opt/test/%.swf"

Similar Posts: