我有一個桌面/移動web應用程序,需要在目標設備上顯示pdf流。我現在使用jquery對話框在桌面上工作。對於移動壽...我的HTML視圖頁面有以下鏈接:如何使用jquery mobile asp.net mvc 4下載並顯示pdf內存流數據
<a href="@Url.Action("PdfView", new { id = @paystub.PayStub_ID})">View PDF</a>
這正確帶我到控制器動作:
public ActionResult PdfView(string id = "")
{
PayStubDataEntity ps = PayStubAccess.GetPayStubByID(new Guid(id), new Guid(Session["Session_Application_UserID"].ToString()));
WebHelper.SetHeadersForDownload(System.Web.HttpContext.Current.Response, "application/pdf", "PayStub.pdf", false);
MemoryStream pdfMemoryStream = SendPayStubToBrowserAsPdf(ps);
//WebHelper.SendFile(System.Web.HttpContext.Current.Response, "application/pdf", "PayStub.pdf", false, pdfMemoryStream);
return File(pdfMemoryStream, "application/pdf");
}
卻遲遲沒有顯示在我的iPhone模擬器(電李子)。沒有錯誤消息。我不確定輸出的s/b在哪裏或如何查看?任何想法將不勝感激。
在android模擬器上試過了嗎? – siri 2013-04-18 15:14:18