复制代码 代码如下:
/// <summary>
/// 执行进程
/// </summary>
/// <param>输入.doc文件路径</param>
/// <param>输出.swf文件路径</param>
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);
}
新闻热点
疑难解答
图片精选