Install and configure swftools in CentOS

Source: Internet
Author: User

Install and configure swftools in CentOS
1. install required libraries and components.

yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel
2. Download, compile, and install swftools.
wgethttp://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
3. Set swftools Environment Variables
vim /etc/profile export PATH=$PATH:/usr/swftools/bin/
4. Install the xpdf Language Pack.
Download the xpdf-chinese-simplified.tar.gz file, decompress it to/usr/share/xpdf, and edit the add-to-xpdfrc file (download the Gbsn00lp. ttf gkai00mp. ttf font), as follows:

Tar zxvf xpdf-chinese-simplified.tar.gz

Unzip font.zip

Mv Gbsn00lp. ttf gkai00mp. ttf xpdf-chinese-simplified/CMap/

Cd/usr/share/xpdf-chinese-simplified

Vim add-to-xpdfrc

The content is as follows:

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

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

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

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

CMapDirAdobe-GB1/usr/share/xpdf-chinese-simplified/CMap

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

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

Save and exit

5. Run the following command to test the conversion:
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"
Conversion successful! Done!
Appendix: Linux environment configuration file openOfficeStartCommand = /usr/lib/openoffice.org3/program/soffice.bin/ -headless\ -accept="socket,host=127.0.0.1,port=8100;urp;"\ -nofirststartwizard pdfToSwfCommand = /usr/local/swftools/bin/pdf2swf bitMapc=-T 9 -s poly2bitmap -s zoom=150 zoom=150 langc=-s languagedir=/usr/share/xpdfl/xpdf-chinese-simplified port = 8100

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.