格式转换 页面上传.doc文件 转换为.swf格式。现在我的方法是用的CMD命令直接运行flashpaper.exe 生成.swf文件。所以会出现flashpaper.exe运行效果,有没有别的解救办法呢?求真相... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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>"); } 利用一个函数到数据库里取回一个客户的多项值,怎么写最好? GradView分页问题 转义字符(急) 求助高手:为什么我的递归会出现两次? mvc如何写个数据访问层? DataSet与DataGrid结合使用的问题?急 关于aspnet网站安装部署项目 如何实现用户下载服务器上的一个文件,如XX.xls,xxx,doc.... 为什么运行asp.net程序时有时候会报禁止访问的错误 关于连接数据库的问题 最新面试问题,高手请进!网络和3个桶装水问题 求助,vs2010,<asp:的控件智能提示全部消失
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>");
}