使用FlashPaper在线转换.doc为.swf

  ///

  /// 执行进程

  ///

  /// 输入.doc文件路径

  /// 输出.swf文件路径

  public void ProcessExec(string sourceFileName, string outPutFileName)

  {

  //FlashPaper文件安装路径 可自行设置

  string flashPrinter = "F:\FlashPaper2.2\FlashPrinter.exe";

  Process pss = new Process();

  pss.StartInfo.CreateNoWindow = false;

  pss.StartInfo.FileName = flashPrinter;

  pss.StartInfo.Arguments = string.Format("{0} {1} -o {2}", flashPrinter, sourceFileName, outPutFileName);

  try

  {

  pss.Start();

  while (!pss.HasExited)

  {

  continue;

  }

  System.Threading.Thread.Sleep(4000);

  Response.Write("Succefull!");

  }

  catch (Exception ex)

  {

  throw ex;

  }

  }

  protected void btnText_Click(object o, EventArgs e)

  {

  string source = Server.MapPath("~/Files/Doc.doc");

  string output = Server.MapPath("~/Files/doc.swf");

  ProcessExec(source, output);

  }