PDF ストリームを KendoUI ウィンドウに表示しようとしています。
結果が KendoUI ウィンドウに返されると、PDF の生データが表示されます。Fiddler を起動して、コンテンツ タイプが正しく処理されているかどうかを確認しました。Fiddler は適切なコンテンツ タイプを表示します。
いろいろなやり取りをしてみました。それぞれの試行で、以下に示す同じ結果が得られます。
コントローラーのスニペットは次のとおりです。
public FileStreamResult DownloadV3()
{
//Create and populate a memorystream with the contents of the database table
MemoryStream mstream = GetPDFData();
HttpContext.Response.AddHeader("content-disposition", "attachment; filename=form.pdf");
return new FileStreamResult(mstream, "application/pdf");
}
KendoUI ウィンドウに表示されるもののスニペットを次に示します。
%PDF-1.5 5 0 obj <>>> endobj 6 0 obj <>stream
以下は JavaScript のスニペットです。
<script type="text/javascript">
$(document).ready(function () {
$("#view1").bind("click", winOpen);
});
function winOpen() {
var id = '6CA88CA9-4F33-E211-84AC-B4A17689C6D9';
var kendoWindow = $("#kjWindow").kendoWindow({
title: "View File",
width: "750px",
height: "480px",
content: "/home/DownloadV3/" + id,
modal: true,
actions: ["Close", "Refresh", "Maximize"]
});
}
私が欠けているものについての考え/
ありがとう。
スティーブ