日期:2014-05-17  浏览次数:20423 次

要怎样修改我才能对文件操作
这是调用flashpaper的函数调用以后不能用
public void ConvertToSwf(string oldFile, string swfFile)
  {
  System.Diagnostics.Process pc = new System.Diagnostics.Process();
  pc.StartInfo.FileName = @"C:\Program Files\Macromedia\FlashPaper 2\FlashPrinter.exe";
  pc.StartInfo.Arguments = string.Format("{0} -o {1}", oldFile, swfFile);
  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();
  }
而我修改成以后就能正确操作,求各位大侠指教,调了一天了
public void ConvertToSwf(string oldFile, string swfFile)
  {
  System.Diagnostics.Process pc = new System.Diagnostics.Process();
  pc.StartInfo.FileName = @"C:\Program Files\Macromedia\FlashPaper 2\FlashPrinter.exe";
  pc.StartInfo.Arguments = string.Format("{0} -o {1}", "E\\hehe.txt", "E:\\hehe.swf");
  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();
  }

------解决方案--------------------
你怎么传递路径的。

E\\hehe.txt ->
E:\\hehe.txt
------解决方案--------------------
localPath是否正确。
你到底想处理的是客户端的文件还是服务器上的,前者是不行的。
在string swfPath = localPath + "\\" + fileNames[0] + ".swf";上下端点,看filePath, swfPath输出什么。
------解决方案--------------------
轉換到swf最好是 iSpring PPT To Flash SDK 6.0.3

http://ufo-crackerx.blog.163.com/blog/static/113078778201222394558376/