Java JACOB:Presentation.Export:PowerPoint可以';无法将^0保存到^1

Java JACOB:Presentation.Export:PowerPoint可以';无法将^0保存到^1,java,jacob,Java,Jacob,我发现当我使用JACOB导出ppt时,我现在不知道。请给我一些建议来处理它 以下是我尝试的方法: 1.要修改文件路径表达式我也得到了这个,但是在内容处理器的C#MonoGame中。我也得到了这个,但是在内容处理器的C#MonoGame中。 public boolean PptExport2Png(String filePath,String exportPath){ Boolean flag = false; ActiveXComponent component = new Ac

我发现当我使用JACOB导出ppt时,我现在不知道。请给我一些建议来处理它

以下是我尝试的方法:
1.要修改文件路径表达式

我也得到了这个,但是在内容处理器的C#MonoGame中。我也得到了这个,但是在内容处理器的C#MonoGame中。
public boolean PptExport2Png(String filePath,String exportPath){
    Boolean flag = false;
    ActiveXComponent component = new ActiveXComponent("PowerPoint.Application");
    try{
        Dispatch presentations = component.getProperty("Presentations").toDispatch();

        Dispatch presentation = Dispatch.call(presentations, "Open", new Variant(filePath),
                new Variant(-1), new Variant(-1), new Variant(0))
                .toDispatch();
        Dispatch.call(presentation,"Export",new Variant(exportPath),new Variant(720),new Variant(540));

    }catch (Exception e){
        System.out.println("|||" + e.toString());
    }finally {

    }
    return false;
}

public static void main(String[] strs)throws Exception{
    String filePath="D://ppttest.ppt";
    String pngPath="D://folder22";
    JacobPptUtils jac = new JacobPptUtils(filePath,true);
    jac.PptExport2Png(filePath,pngPath);
}
 public static void main(String args[]) throws Exception{
   source = "D:/test.ppt" ;
    dest = "D:/xxx.pdf" ;
    File file = new File(source);

    if(!file.exists()){
        throw new Exception("error");
    }
    ppt2Pdf(source,dest);

   }
}