日期:2014-05-17 浏览次数:20437 次
private void ConvertSwf(string inputPath, string outputPath)
{
Process p = new Process();
try
{
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;//不适应系统外壳程序启动
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow = true;//不创建窗口
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
p.Start();
string strOutput = null;
//string inputPath = Server.MapPath("~//11.docx");
//string outputPath = Server.MapPath("~//11.swf");
//D:\Asp.NetPro\PPTToSwf\swftools\FlashPaper\FlashPaper2.2\\FlashPrinter.exe
//D:\\Asp.NetPro\\PPTToSwf\\swftools\\FlashPaper2.2\\FlashPrinter.exe
string s = "D:\\Asp.NetPro\\PPTToSwf\\swftools\\FlashPaper\\FlashPaper2.2\\FlashPrinter.exe "
+ "\"" + inputPath + "\" -o \"" + outputPath + "\"";
p.StandardInput.WriteLine(s);
p.StandardInput.WriteLine("exit");
strOutput = p.StandardOutput.ReadToEnd();
&nbs