CentOS安装配置Swftools

1.安装所需的库和组件。机器之前安装过了,主要安装的是下面几个组件。如果不安装会提示machine `x86_64-unknown-linux' not recognized

yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel

2、下载编译安装swftools。

wget http://www.swftools.org/swftools-2013-04-09-1007.tar.gz
tar vxzf swftools-2013-04-09-1007.tar.gz
cd swftools-2013-04-09-1007.tar.gz
./configure --prefix=/usr/swftools
make
make install

3、设置swftools环境变量,使pdf2swf成为一个可执行命令

vim /etc/profile

在末尾添加:

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

4、安装xpdf语言包。下载xpdf-chinese-simplified.tar.gz文件,这里贴出官网:xpdfreader,解压到/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

保存后退出

5、最后使用如下转换命令测试:

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"

转载于:https://my.oschina.net/hengbao666/blog/1785147

SWFTools is a collection of utilities for working with Adobe Flash files (SWF files). The tool collection includes programs for reading SWF files, combining them, and creating them from other content (like images, sound files, videos or sourcecode). SWFTools is released under the GPL. The current collection is comprised of the programs detailed below: • PDF2SWF A PDF to SWF Converter. Generates one frame per page. Enables you to have fully formatted text, including tables, formulas, graphics etc. inside your Flash Movie. It's based on the xpdf PDF parser from Derek B. Noonburg. • SWFCombine A multi-function tool for inserting SWFs into Wrapper SWFs, contatenating SWFs, stacking SWFs or for basic parameter manipulation (e.g. changing size). • SWFStrings Scans SWFs for text data. • SWFDump Prints out various informations about SWFs, like contained images/fonts/sounds, disassembly of contained code as well as cross-reference and bounding box data. • JPEG2SWF Takes one or more JPEG pictures and generates a SWF slideshow from them. Supports motion estimation compression (h.263) for better compression of video sequences. • PNG2SWF Like JPEG2SWF, only for PNGs. • GIF2SWF Converts GIFs to SWF. Also able to handle animated gifs. • WAV2SWF Converts WAV audio files to SWFs, using the L.A.M.E. MP3 encoder library. • AVI2SWF Converts AVI animation files to SWF. It supports Flash MX H.263 compression. Some examples can be found at examples.html. (Notice: this tool is not included anymore in the latest version, as ffmpeg or mencoder do a better job nowadays) • Font2SWF Converts font files (TTF, Type1) to SWF. • SWFBBox Allows to read out, optimize and readjust SWF bounding boxes. • SWFC A tool for creating SWF files from simple script files. Includes support for both ActionScript 2.0 as well as ActionScript 3.0. • SWFExtract Allows to extract Movieclips, Sounds, Images etc. from SWF files. • AS3Compile A standalone ActionScript 3.0 compiler. Mostly compatible with Flex. SWFTools
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值