swftools ghostscript

安装openoffice3

wget http://download.services.openoffice.org/extended/3.3.0rc10/OOo_3.3.0rc10_20110118_Linux_x86-64_install-rpm-wJRE_zh-CN.tar.gz

tar zxvf OOo_3.3.0_Linux_x86-64_install-rpm-wJRE_zh-CN.tar.gz

cd /usr/src/OOO330_m20_native_packed-1_zh-CN.9567/RPMS

rpm -ivh *.rpm --nodeps --force 
在CentOs下面会缺少黑体和宋体的,直接找到Windows下面的字体目录把黑体和宋体复制进去到目录 
/opt/openoffice.org/basis3.3/share/fonts/truetype/
需要重启后才会生效
 

 

启动服务: 

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

 

yum remove openoffice.org-core 即可完全卸载 OpenOffice.org

 

安装OpenOffice SDK3.3

 

 

cd /usr/src
wget http://ftp.nluug.nl/office/openoffice/stable/3.3.0/OOo-SDK_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz
tar zxvf OOo-SDK_3.3.0_Linux_x86-64_install-rpm_en-US.tar.gz
cd OOO330_m20_native_packed-1_en-US.9567/RPMS/
rpm -vih *.rpm
 

 

 安装jodconverter.2.2.2 ,安装了这个之后就已经可以实现DOC转PDF了

cd /usr/local
wget http://nchc.dl.sourceforge.net/project/jodconverter/JODConverter/2.2.2/jodconverter-2.2.2.zip
unzip jodconverter-2.2.2.zip
#解压,复制到一个目录里面去,就能直接用了,调用它里面的/lib/jodconverter-cli-2.2.2.jar这个玩意儿就行
#转换命令
java -jar /usr/local/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar /wwwroot/18.doc /wwwroot/18.pdf

 

 

swftools

[root@centos5 ~]# wget http://www.swftools.org/swftools-0.9.1.tar.gz
[root@centos5 ~]# tar zxvf swftools-0.9.1.tar.gz
[root@centos5 ~]# yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel
[root@centos5 ~]# cd swftools-0.9.1
[root@centos5 ~]# ./configure
[root@centos5 ~]# make
[root@centos5 ~]# make install
#中文支持安装:
mkdir –p /usr/local/share/xpdf
cd /usr/local/share/xpdf/
#下载中文支持及字体库
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified.tar.gz
wget http://www.nginxs.com/download/font.zip
tar zxvf xpdf-chinese-simplified.tar.gz
unzip font.zip
mv Gbsn00lp.ttf gkai00mp.ttf xpdf-chinese-simplified/CMap/ 

vi add-to-xpdfrc
#在最后面加入两行代码
displayCIDFontTT Adobe-GB1      /usr/local/share/xpdf/chinese-simplified/CMap/gkai00mp.ttf
displayCIDFontTT Adobe-GB1      /usr/local/share/xpdf/chinese-simplified/CMap/Gbsn00lp.ttf

   

 

安装成功后在/usr/local/bin下可以找到所有的东西。安装好后执行pdf2swf就可以看下帮助.

 

pdf2swf -o /wwwroot/out.swf -T -z -t -f /wwwroot/a.pdf -s languagedir=/usr/local/share/xpdf/xpdf-chinese-simplified -s flashversion=9

 

 

 ghostscript 

 

cd /usr/src
wget http://ghostscript.com/releases/ghostscript-8.71.tar.gz
tar zxvf ghostscript-8.71.tar.gz
cd ghostscript-8.71
./configure --prefix=/usr
mkdir obj
mkdir bin
make all
make install

 

 

你可能感兴趣的:(script)