Print2Flash3 com.jacob.com.ComFailException: Can't co-create object
原本用falsh易做图2.2 ,但是放到64位系统上,用不了。现在换了print2flash。但是一直报com.jacob.com.ComFailException: Can't co-create objectActiveXComponent p2f = new ActiveXComponent("Print2Flash3.Server");
我把上面的“Print2Flash3.Server”缓存 "Word.Application"就可以没问题。可是用“Print2Flash3.Server” 就报com.jacob.com.ComFailException: Can't co-create object 。
折腾了一天还没出来。恳请在线知道的大哥们,能解决我的燃眉之急。
全部代码如下:
import java.io.*;--------------------编程问答-------------------- 在线等待,希望大侠们帮忙啊!! --------------------编程问答-------------------- 怎么没人回复呢!!!! --------------------编程问答-------------------- 请问解决了么?
import com.jacob.activeX.*;
import com.jacob.com.*;
public class TestPrint2Flash {
public static void main(String[] args) throws java.io.IOException {
getswf("D:\\aa.doc");
//System.out.println(System.getProperty("java.library.path" ));
}
public static void getswf(String args) throws IOException {
if (args.length() > 0) {
try
{
ComThread.InitSTA();
// Create Server object
ActiveXComponent p2f = new ActiveXComponent("Print2Flash3.Server");
// Setup inte易做图ce and protection options
ActiveXComponent defProfile = new ActiveXComponent(p2f.getProperty("DefaultProfile").toDispatch());
defProfile.setProperty("Inte易做图ceOptions", P2FConst.INTLOGO | P2FConst.INTZOOMSLIDER | P2FConst.INTPREVPAGE | P2FConst.INTGOTOPAGE | P2FConst.INTNEXTPAGE);
defProfile.setProperty("ProtectionOptions", P2FConst.PROTDISPRINT | P2FConst.PROTENAPI);
// Convert document
p2f.invoke("ConvertFile", args);
System.out.println("Conversion completed successfully");
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("An error occurred at conversion: "+e.toString());
}
finally {
ComThread.Release();
}
} else
System.out.println("转swf出错。。。。");
}
}
补充:Java , Java EE