准备资料:
1.xpdfbin-win-3.03.zip、xpdf-chinese-simplified.tar.gz
下载地址:http://www.foolabs.com/xpdf/download.html
2.两个中文字体文件:gkai00mp.ttf、Gbsn00lp.ttf
下载地址:http://code.google.com/p/atyu30/downloads/detail?name=gbsn00lp.ttf.tar.gz&can=2&q=
http://download.csdn.net/detail/blackjack2007u/1841186(不要骂我,被逼无奈好不容易在CSDN找到这个下载地址)
3.加上PDF2SWF工具 http://www.swftools.org/download.html
首先安装SWFTools,不考虑中文的情况下,一个pdf2swf.exe已经足够我们使用转换任务。
下面集中精力解决中文字符的问题。
1.解压缩xpdfbin-win-3.03.zip到指定目录(C:xpdf)
2.解压缩xpdf-chinese-simplified.tar.gz 到上面的目录下(C:xpdfxpdf-chinese-simplified)
3.拷贝两个字体文件gkai00mp.ttf、Gbsn00lp.ttf到CMap目录下(C:xpdfxpdf-chinese-simplifiedCMap)
4.修改C:xpdfxpdf-chinese-simplified下的add-to-xpdfrc文件<注意相关路径配置>
#----- begin Chinese Simplified support package (2011-10.27) cidToUnicode Adobe-GB1 c:xpdfxpdf-chinese-simplifiedAdobe-GB1.cidToUnicode unicodeMap ISO-2022-CN c:xpdfxpdf-chinese-simplifiedISO-2022-CN.unicodeMap unicodeMap EUC-CN c:xpdfxpdf-chinese-simplifiedEUC-CN.unicodeMap unicodeMap GBK c:xpdfxpdf-chinese-simplifiedGBK.unicodeMap cMapDir Adobe-GB1 c:xpdfxpdf-chinese-simplifiedCMap toUnicodeDir c:xpdfxpdf-chinese-simplifiedCMap displayCIDFontTT Adobe-GB1 C:xpdfxpdf-chinese-simplifiedCMapgbsn00lp.ttf displayCIDFontTT Adobe-GB1 C:xpdfxpdf-chinese-simplifiedCMapgkai00mp.ttf #----- end Chinese Simplified support package
OK,下面看一下执行的过程:
在普通的pdf2swf -o {0} -t {1} 形式的命令后,加上一个-s 指定languagedir,就可以成功解决中文PDF2SWF的问题啦!
仅供参考!