使用FlashPaper实现文件转换swf功能,在网页上预览,发布iis 无法执行
服务器环境
windows seriver 2003 sp2
iis 6.0
.net framework 4.0
在网上找到的转换格式的方法
C#代码
filePath = MapPath(filePath);
string swfFilePath = filePath.Substring(0, filePath.LastIndexOf(".")) + ".swf";
System.Diagnostics.Process pc = new System.Diagnostics.Process();
pc.StartInfo.FileName = @"D:\Program Files\FlashPaper\FlashPrinter.exe";
pc.StartInfo.Arguments = string.Format("{0} -o {1}", filePath, swfFilePath);
pc.StartInfo.CreateNoWindow = true;//不创建窗口
pc.StartInfo.UseShellExecute = false;//不使用系统外壳程序启动
pc.StartInfo.RedirectStandardInput = false;
pc.StartInfo.RedirectStandardOutput = false;
pc.StartInfo.RedirectStandardError = true;
pc.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
pc.Start();
pc.WaitForExit();
pc.Close();
pc.Dispose();