yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel
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/local/swftools
make
make install
vim /etc/profile
export PATH=$PATH:/usr/local/swftools/bin/ 注意:若文件中存在export PATH的话,请在最后直接追加
:/usr/local/swftools/bin/
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
保存后退出 注意:一般这些都是配置好的,我的缺少最后一个,追加上就ok了
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" 注意:pdf2swf 的目录下或将路径带上,查看路径方法 whereis pdf2swf 就ok了