代码如下
class ConvertToSwf
{
private String swftoolsPath;
public ConvertToSwf(String swftoolsPath)
{
this.swftoolsPath=swftoolsPath;
}
public boolean convertFileToSwf2(String sourceFilePath,String swfFilePath)
{
Process process = null;
try
{
process = Runtime.getRuntime().exec(swftoolsPath+" -o "+swfFilePath+" -t "+sourceFilePath+" -s languagedir=C:\\Conversion\\xpdf-chinese-simplified -T -9 -f -G");
} catch (IOException e1) {
e1.printStackTrace();
return false;
}
return false;
}
}
ConvertToSwf swf = new ConvertToSwf("D:\\Java\\swfTools\\pdf2swf.exe");
boolean is = swf.convertFileToSwf("C:\\Conversion\\f08d3c8865b11337305098074.pdf", "C:\\Conversion\\cpzs22.swf");
System.out.println(is);
C:\Conversion\xpdf-chinese-simplified配置如下
cidToUnicode Adobe-GB1 C:\Conversion\xpdf-chinese-simplified\Adobe-GB1.cidToUnicode
unicodeMap ISO-2022-CN C:\Conversion\xpdf-chinese-simplified\ISO-2022-CN.unicodeMap
unicodeMap EUC-CN C:\Conversion\xpdf-chinese-simplified\EUC-CN.unicodeMap
unicodeMap GBK C:\Conversion\xpdf-chinese-simplified\GBK.unicodeMap
cMapDir Adobe-GB1 C:\Conversion\xpdf-chinese-simplified\CMap
toUnicodeDir C:\Conversion\xpdf-chinese-simplified\CMap
fontFileCC Adobe-GB1 C:\Conversion\xpdf-chinese-simplified\CMap\gkai00mp.ttf
displayCIDFontTT Adobe-GB1 C:\Conversion\xpdf-chinese-simplified\CMap\gkai00mp.ttf
转换报错
NOTICE Adding C:\Conversion\xpdf-chinese-simplified to language pack directories
Error: Couldn't create a font for 'QXRUDT+SimSun'
Error: Couldn't create a font for 'QXRUDT+SimSun'
Error: Couldn't create a font for 'QXRUDT+SimSun'
Error: Couldn't create a font for 'QXRUDT+SimSun'
Error: Couldn't create a font for 'QXRUDT+SimSun'
。。。。。
求解释啊
------解决思路----------------------
同样求高手指点~
------解决思路----------------------
我也报了同样的错,正在寻找答案
高手在哪里?
------解决思路----------------------
process = Runtime.getRuntime().exec(swftoolsPath+" -o "+swfFilePath+" -t 9");
你这样试试,如果这样不报错你就看看你的C:\Conversion\xpdf-chinese-simplified