linux安装swftools

wget http://www.swftools.org/swftools-0.9.1.tar.gz

tar zxvf swftools-0.9.1.tar.gz

wget http://nchc.dl.sourceforge.net/project/libpng/zlib/1.2.6/zlib-1.2.6.tar.gz

       tarzxvf zlib-1.2.6.tar.gz

       cd/opt/src/zlib-1.2.6

       ./configure

       ./make

       ./makeinstall

      

       cd/opt/src

       wget http://www.ijg.org/files/jpegsrc.v8d.tar.gz

tar zxvf jpegsrc.v8d.tar.gz

cd jpegsrc.v8d

./configure

make

make install

 

$wget http://nchc.dl.sourceforge.net/project/freetype/freetype2/2.4.8/freetype-2.4.8.tar.bz2

2$tar xvf freetype-2.4.8.tar.bz2

3$cd freetype-2.4.8

4$./configure

5$make&&sudo make install

yum install giflib-devel

yum-y install giflib-devellibjpeg-devel freetype-devel t1lib-devel zlib

yum install gcc-c++

ldconfig /usr/local/lib

 

 

 

       cd/opt/src/swftools-0.9.1

       ./configure–prefix=/opt/swftools

make

 

将swfs目录下的Makefile和Makefile.in两个文件中的rm语句带有的参数-o -L 去掉此为0.9.2版本时才需要

make install

 

 

vim /etc/profile

export PATH=$PATH:/opt/swftools/bin/

source /etc/profile

 

 

cd /opt/src

wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified.tar.gz

下载 font.zip 下载地址

http://up.zhan58.com:888/dl.php?UWEDbQU+BzcBAwU/WjpQP1BmVG0B6wajVacBuVPRV7YHIlYmUWBXdg48VG9TPlIjVSoOclMhVjADNAqzV+oK6VHgA6QF0we0AdUF0VqyUM5Qg1S4AaUGhVXjAcZT01diBzNWIlFoVzIOY1RsUyJSflVyDn5TN1Z4AzUKPFcyCjFRNwM0BT8HIgFyBSVaL1A0UOZU/QGUBuBVuQHPU7FXkwfWVrVRvVe0Dn1UelM7UiBVIA5sUzhWOAM3CghXOgo8UToDNQVmB2YBegU3WihQb1A2VGABNwYwVT0Ba1NgVyMHIVYhUTtXMA5jVDFTYFJ/VTcOO1N+VmQDagp4VzIKPFFjA2cFMwdjAT0FM1o4UGNQO1RkAToGNlU0AWVTNFc1BzVWY1E2V2YOYFRiUzZSYlVlDj9TN1ZnAzEKZFd9CiJRbgN0BXQHOgE9BSJaM1BvUDBUEQE2BjZVMgFsUxNXQAdoVmNRP1dGDmVUOFNnUmdVPg5IU2FWYQNqCmFXYwpqUTMDQAUXBxYBbAVlWmNQaw==

上传

解压缩

mv gbsn00lp.ttfgkai00mp.ttf /opt/src/xpdf-chinese-simplified/CMap

复制 xpdf-chinese-simplified目录到/usr/share/xpdf

vi add-to-xpdfrc

    内容如下:

   #—– beginChinese Simplified support package (2011-sep-02)

cidToUnicode    Adobe-GB1       /usr/share/xpdf/xpdf-chinese-simplified/Adobe-GB1.cidToUnicode

unicodeMap      ISO-2022-CN    /usr/share/xpdf/xpdf-chinese-simplified/ISO-2022-CN.unicodeMap

unicodeMap      EUC-CN         /usr/share/xpdf/xpdf-chinese-simplified/EUC-CN.unicodeMap

unicodeMap      GBK             /usr/share/xpdf/xpdf-chinese-simplified/GBK.unicodeMap

cMapDir         Adobe-GB1      /usr/share/xpdf/xpdf-chinese-simplified/CMap

toUnicodeDir                   /usr/share/xpdf/xpdf-chinese-simplified/CMap

displayCIDFontTT Adobe-GB1/usr/share/xpdf/xpdf-chinese-simplified/CMap/gbsn00lp.ttf

displayCIDFontTT Adobe-GB1/usr/share/xpdf/xpdf-chinese-simplified/CMap/gkai00mp.ttf

#fontFileCC     Adobe-GB1       /usr/…./gkai00mp.ttf

#—– end Chinese Simplifiedsupport package

 

[root@test~]# echo"/usr/local/lib" >> /etc/ld.so.conf

[root@test ~]#ldconfig

xpdf-chinese-simplified]#pdf2swf -s languagedir=/usr/share/xpdf/xpdf-chinese-simplified -T 9 -spoly2bitmap -s zoom=150 -s flashversion=9"/mnt/ftproot/LiferayCookBook_decrypted.pdf" -o"/mnt/ftproot/test.swf"

测试