centos 下 swftools pdf2swf安装

 下载 swftools-0.9.2.tar.gz  并解压安装
$wget http://www.swftools.org/swftools-0.9.2.tar.gz
$tar vxzf swftools-0.9.2.tar.gz
$cd swftools-0.9.2
$./configure --prefix=/usr/swftools
$make
$make install
   可能遇到的问题
    modules/.././types.h:39:2: 错误:#error "no way to define 64 bit integer"
    modules/.././types.h:42:2: 错误:#error "don't know how to define 32 bit integer"
    modules/.././types.h:45:2: 错误:#error "don't know how to define 16 bit integer"
    modules/.././types.h:48:2: 错误:#error "don't know how to define 8 bit integer"
    解决方法:
    [root~]# ldconfig /usr/local/lib
    然后再执行
    [root~]# ldconfig /usr/local/lib
    [root~]# ./configure
    还可能遇到的问题
    make[1]: *** [install] 错误 1
    make[1]: Leaving directory `/root/swftools-0.9.2/swfs'
    make: *** [install] 错误 2
    解决方法:
    将swfs目录下的Makefile和Makefile.in两个文件中的 -o -L 去掉
    make install
    成功
 
6.设置环境变量
vim /etc/profile
export PATH=$PATH:/usr/swftools/bin/
source /etc/profile



7.安装xpdf语言包,下载xpdf-chinese-simplified.tar.gz文件,解压到/usr/share/xpdf下,编辑add-to-xpdfrc文件,如下:
    tar zxvf xpdf-chinese-simplified.tar.gz
    unzip font.zip                                                //字体要提前下载好
    mv Gbsn00lp.ttf gkai00mp.ttf xpdf-chinese-simplified/CMap/
    cd /usr/share/xpdf/xpdf-chinese-simplified
    vi add-to-xpdfrc
    内容如下:
    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/gkai00mp.ttf
    保存后退出
 
  
8.测试
pdf2swf -s languagedir=/usr/share/xpdf/xpdf-chinese-simplified -T 9 -s poly2bitmap -s zoom=150 -s flashversion=9 "/opt/123.pdf" -o "/opt/test/%.swf" 

你可能感兴趣的:(liboffice)