`
收藏列表
标题 标签 来源
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html jdk-7u45-linux-i586.tar.gz
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
liuyan http://www.oschina.net/question/254998_66190sort=default?sort=default&p=2#answers
嗯嗯, 问题我已经解决了,是命令行的问题之前的我命令行是:"D:/Program Files/SWFTools/pdf2swf.exe " + pdfFile.getPath() + " -o " + swfFile.getPath() + " -T 9" ,现在改为了:

"D:/Program Files/SWFTools/pdf2swf.exe" + " -o " + destPath + "/" + fileName + " -s flashversion=9 " + sourcePath + "",我把该方法的代码发来看看吧,希望大家能用的着

:

/** * * @param sourcePath 源pdf文件 

 * @param destPath 目标路径 

 * @param fileName swf文件名如:542315.swf 

 * @return 

 * @throws IOException 

 */

public static int convertPDF2SWF(String sourcePath, String destPath, String fileName) throws IOException {  

       //目标路径不存在则建立目标路径  

        File dest = new File(destPath);  

        if (!dest.exists()) dest.mkdirs();  

          

        //源文件不存在则返回  

        File source = new File(sourcePath);  

        if (!source.exists()) return 0;  

        

      //调用pdf2swf命令进行转换  

       String command = "D:/Program Files/SWFTools/pdf2swf.exe" + " -o " + destPath + "/" + fileName + " -s flashversion=9 " + sourcePath + "";  

          

       Process pro = Runtime.getRuntime().exec(command);  

         

       BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(pro.getInputStream()));  

      while (bufferedReader.readLine() != null);   

        

       try {  

           pro.waitFor();  

       } catch (InterruptedException e) {  

           e.printStackTrace();  

      }    

       return pro.exitValue();  

    } 
ui http://www.yootheme.com/demo/themes/joomla/2011/corona/index.php
http://www.yootheme.com/demo/themes/joomla/2011/corona/index.php
Global site tag (gtag.js) - Google Analytics