现在项目需求,如题。
不知道应该从何处着手,有资料说先看看c的实现,c是把路径直接指向了传真机,自动装换。java 如何实现,或者有什么好的思路和建议,忘各位大侠指点。

解决方案 »

  1.   

    纠正下 转换为 tif 文件
      

  2.   


    package test;import com.jacob.activeX.ActiveXComponent;
    import com.jacob.com.ComThread;
    import com.jacob.com.Dispatch;
    import com.jacob.com.Variant;public class CdllCall { private static ActiveXComponent component;
    private static Dispatch dispatch;
    static{
    System.loadLibrary("ConvertAgent");
    component=new ActiveXComponent("ConvertAgent");
    dispatch=component.getObject();
    }
    public static void InitAgent() {

    Variant variant=Dispatch.call(dispatch,"InitAgent",new Variant("SM_ALL_TYPE"));
    variant.getEmpty();

    }
        public static void PrintAgent(){
        
         Variant variant=Dispatch.call(dispatch,"PrintAgent",new Variant("d:\\日报.doc"),new Variant("d:\\日报tif.tif"));
    variant.getEmpty();
        }
        public static void CleanAgent(){
        
         Variant variant=Dispatch.call(dispatch,"CleanAgent");
    variant.getEmpty();
        }

    public static void main(String[] args) {

    CdllCall.InitAgent();
    CdllCall.PrintAgent();
    CdllCall.CleanAgent();

    }}这是调用代码,
    这是 异常 Caused by: com.jacob.com.ComFailException: Can't get object clsid from progid
    没有找到.dll 我哪里写错了么