1

.doc 形式のバイナリ ファイルを取得して印刷するプリンター ページがあります。

IE、Firfox、chroomでの作業

しかし、iPadで表示しようとすると、空のページが表示されました?? 以下はコードです:

                Dim filepath() As Byte
                filepath = Session(Request.QueryString("id"))
                Response.ClearHeaders()
                Response.ClearContent()
                Response.AddHeader("content-disposition", "attachment;filename=""MyFile.doc""")
                Response.AddHeader("Content-Description", "myfiles")
                Response.AppendHeader("Content-Type", "application/msword")
                Response.AppendHeader("Content-Transfer-Encoding", "binary")
                Response.AppendHeader("Pragma", "public")
                Response.AppendHeader("Cache-Control", "must-revalidate")
               Response.BinaryWrite(filepath)
                 Response.Flush()
                Response.End()
4

1 に答える 1

1

ドキュメントを ms word で開き、Microsoft wrod 形式で再度保存してから確認してください。

同じコード:

 Dim filepath() As Byte
            filepath = Session(Request.QueryString("id"))
            Response.ClearHeaders()
            Response.ClearContent()
            Response.AddHeader("content-disposition", "attachment;filename=""MyFile.doc""")
            Response.AddHeader("Content-Description", "myfiles")
            Response.AppendHeader("Content-Type", "application/msword")
            Response.AppendHeader("Content-Transfer-Encoding", "binary")
            Response.AppendHeader("Pragma", "public")
            Response.AppendHeader("Cache-Control", "must-revalidate")
           Response.BinaryWrite(filepath)
             Response.Flush()
            Response.End()
于 2012-11-28T15:54:51.073 に答える