復制代碼 代碼如下:
/// <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);
}
新聞熱點
疑難解答
圖片精選