[WebMethod]
public static string exportDataPDF()
{
System.Web.HttpRequest Request = System.Web.HttpContext.Current.Request;
string fileName = "事件还原分析";
string url = Request.Url.AbsoluteUri;
string urlQuest = Request.Url.PathAndQuery;
url = Regex.Replace(url, @"\.aspx.*", @"PDF.aspx");
string filePath = CommonExportPDF.createPDF(url);
//FileStream fs = new FileStream(filePath, FileMode.Open);
//byte[] file = new byte[fs.Length];
//fs.Read(file, 0, file.Length);
//fs.Close();
//HttpResponse Response = System.Web.HttpContext.Current.Response;
//System.Web.HttpContext.Current.Response.Clear();
//System.Web.HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8) + ".pdf");//強制下載
//System.Web.HttpContext.Current.Response.ContentType = "application/octet-stream";
//System.Web.HttpContext.Current.Response.BinaryWrite(file);
return filePath;
}