ツールとしてC#、asp.netを使用しています。
次のコードを使用して、クライアント側でファイルを送信して開き、クライアント側でドキュメントを開きながら、任意のアプリケーション (Word、PDF リーダーなど) の組み込みの印刷ダイアログ ボックスを同時に開きたいと考えています。
if (lfileFormat.ToUpper() == "Excel")
{
Response.ContentType = "application/vnd.ms-excel";
}
else if (lfileFormat.ToUpper() == "PDF")
{
Response.ContentType = "application/pdf";
}
else if (lfileFormat.ToUpper() == "HTML")
{
Response.ContentType = "text/HTML";
}
Response.AddHeader("Content-Disposition", string.Format("attachment; filename = {0}", fi.Name));
Response.AddHeader("Content-Length", fi.Length.ToString());
Response.TransmitFile(fi.FullName);
Response.End();