日期:2014-05-20  浏览次数:20791 次

print2flash小程序求救(高分悬赏)
我做了以下程序(仿百度文库把doc,ppt等转换成swf),在xp下可以运行,但在64位机器上无法运行,请大家帮忙,可以去下载我的代码调试:

代码(包括print2flash3-64bit安装程序)下载:http://www.023niit.com:100/print2flashDemo.rar

Print2Flash 3 Print  虚拟打印机我装好了的
Interop.Print2Flash3.dll此组件我在cmd下一注册就报错
运行到这句就报错:IServer server = new Server();//声明并初始化转换服务器类

部分代码:
protected void Button1_Click(object sender, EventArgs e)
    {
        IServer server = new Server();//声明并初始化转换服务器类
        server.SetP2FPrinterAsDefault();//设置问默认的虚拟打印机
        if (server.Skins["custom_chainan"] == null)
        {
            server.Skins.Add("custom_chainan");
        }
        ISkin skin = (ISkin)server.Skins["custom_chainan"];
        skin.SetToolbarImage(TOOLBAR_IMAGE.IMGLOGO, Server.MapPath("~/UploadFiles/logo.png"));//必须为png格式的图片全名;更改转出来的logo图片
        skin.HelpButtonURL = "http://blog.csdn.net/chainan1988";
        skin.LogoURL = "http://blog.csdn.net/chainan1988";
        skin.ApplyChanges();
        Print2Flash3.INTERFACE_OPTION interfaceOption = (Print2Flash3.INTERFACE_OPTION)server.DefaultProfile.InterfaceOptions;
        server.DefaultProfile.InterfaceOptions = (int)(interfaceOption & ~Print2Flash3.INTERFACE_OPTION.INTLOGO);//去掉logo图片(可选),这样的话上面设置logo图片就看不到效果

        string sourceFile = Server.MapPath("~/UploadFiles/doc.doc");
        string outputDir = Server.MapPath("~/UploadFiles/");
        string outputFile = outputDir + "out.swf";

        //转换单个文档
        server.ConvertFile(sourceFile, outputFile, Type.Missing, Type.Missing, Type.Missing);//转换单个文档,第一个参数是要转换的文档名,第二个是转换后的文档名
        //转换批量文档
        IBatchProcessingOptions batchOptions = new BatchProcessingOptions();
        batchOptions.ActivityTimeout = 1000;
        batchOptions.AfterPrintingTimeout = 1000;
        batchOptions.BeforePrintingTimeout = 1000;
        batchOptions.PrintingTimeout = 1000;
        batchOptions.KillProcessIfTimeout = ThreeStateFlag.TSF_AUTO;
        batchOptions.PressPrintButton = ThreeStateFlag.TSF_AUTO;
        batchOptions.KillProcessIfTimeout = ThreeStateFlag.TSF_AUTO;
        batchOptions.KeepAutomationAppRef = APPLICATIONTYPE.ALL;
        batchOptions.KillAllAutomationProcesses = ThreeStateFlag.TSF_AUTO;