页面上传.doc文件 转换为.swf格式。
现在我的方法是用的CMD命令直接运行flashpaper.exe 生成.swf文件。
所以会出现flashpaper.exe运行效果,有没有别的解救办法呢?
求真相...

解决方案 »

  1.   

    Process p = new Process();
                ProcessStartInfo startInfo = new ProcessStartInfo();
                string paperroot = @"D:\Program Files\FlashPaper2.2\FlashPrinter.exe";
                string docFile = Server.MapPath("1.doc");
                string swfFile = Server.MapPath("2.swf");
                startInfo.FileName = paperroot;
                startInfo.Arguments = string.Concat(docFile, " -o ", swfFile);
                startInfo.UseShellExecute = false;
                startInfo.RedirectStandardInput = false;
                startInfo.RedirectStandardOutput = false;
                startInfo.CreateNoWindow = false;
                p.StartInfo = startInfo;
                p.Start();
                p.WaitForExit();
                
                if (!File.Exists(Server.MapPath("2.swf")))
                {
                    Response.Write("<script>alert('失败!')</script>");
                }
                else
                {
                    File.Delete(Server.MapPath("1.doc"));
                    Response.Write("<script>alert('成功!')</script>");
                }